jQuery ajaxStop()Method
Examples
Trigger an alert box when all AJAX requests complete:
$(document).ajaxStop(function(){
alert("All AJAX requests completed");
});
Try it yourself »
Definition and Usage
The ajaxStop() method specifies a function to run when all AJAX requests have completed.
When an AJAX request completes, jQuery checks whether there are any more AJAX requests. If there are no other requests pending, the ajaxStop() method executes the specified function.
Note:Since jQuery version 1.8, this method is only attached to the document.
Syntax
$(document).ajaxStop(function())
| Parameter | Description |
|---|---|
| function() | Required. Specifies the function to run when all AJAX requests complete. |
Other Extensions
jQuery AJAX Methods