简体   繁体   中英

jquery ajax callback not working

please helppp :/ I swear to GOD this things was working yesterday pretty well. Just broke today, dont know why. but the done callback from $.ajax is not firing.

function check() {
                $.ajax({
                    url: "/statistics/setup-Table",
                    dataType : "json",
                    success: function(data){
                        alert("check "+data['total']);
                    }
                }).done(function(){
                    alert("done");
                }).fail(function(){
                    alert("fail");
                }).always(function(){
                    alert("always");
                });
            }

i only get one alert >> "check 24"

no alerts from done, fail or always pops up. even for the other $.ajax calls, callback functions are not getting fired. The url is fine too.

Thanks in advance.

It was the version I was using of Jquery that messed things up. the CDN that is. Kevin B - thank you much .that really helped. Thank you to all the rest as well who looked into it for me . You guys r amazing, i love this community. i hope i can help back as well ..

later guys. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM