How do I access document.ready functions?

  • 0
    Here is the delFly method not visible outside document.ready.

    function deleteFl(n){
        delFly(n)
    }
    $(document).ready(function () {
    
    
        function delFly(n) {
            console.log("22222")
            const hourTag = {
                "deleteFly": "" + n + ""
            };
            $.ajax({
                method: "post",
                data: hourTag,
                error: function (message) {
                },
                success: function (responseJson) {
                    $.each(responseJson, function (index, flights) {
                        load_data(flights.id, flights.date1, flights.date2, flights.city.name, flights.terminal, flights.status);
                    });
                }
            });
        }
    });
    JavaScript Anonymous, Oct 19, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!