开发者

What event fires when an AJAX request is sent?

开发者 https://www.devze.com 2023-02-10 23:05 出处:网络
What handler should I use to catch the moment when an AJAX request has just been sent to the server withi开发者_StackOverflow社区n document.ready?I think you\'re looking for .ajaxComplete().

What handler should I use to catch the moment when an AJAX request has just been sent to the server withi开发者_StackOverflow社区n document.ready?


I think you're looking for .ajaxComplete().

$('#el').ajaxComplete(function() {
    …
});

Edit

Try this:

$(window).ajaxComplete(function() {
    …
});

Note: these only work if the AJAX request was sent with jQuery.


You might be looking for .ajaxSend() or .ajaxStart() Jquery AJAX events

0

精彩评论

暂无评论...
验证码 换一张
取 消