Reputation: 37
What handler should I use to catch the moment when an AJAX request has just been sent to the server within document.ready
?
Upvotes: 3
Views: 136
Reputation: 8855
You might be looking for .ajaxSend()
or .ajaxStart()
Jquery AJAX events
Upvotes: 1
Reputation:
I think you're looking for .ajaxComplete()
.
$('#el').ajaxComplete(function() {
…
});
Try this:
$(window).ajaxComplete(function() {
…
});
Note: these only work if the AJAX request was sent with jQuery.
Upvotes: 2