Easy Tutorial
❮ Traversing Find Traversing Siblings ❯

jQuery ajaxStop() Method

jQuery AJAX Methods

Example

Triggers an alert box when all AJAX requests are completed:

$(document).ajaxStop(function(){
    alert("All AJAX requests completed");
});

Definition and Usage

The ajaxStop() method specifies a function to be run when all AJAX requests are completed.

When an AJAX request completes, jQuery checks if there are more AJAX requests. If no other requests are pending, the ajaxStop() method runs the specified function.

Note: As of jQuery version 1.8, this method should only be attached to the document.


Syntax

Parameter Description
function() Required. A function to be run when all AJAX requests are completed.

jQuery AJAX Methods

❮ Traversing Find Traversing Siblings ❯