jQuery ajaxSuccess()Method
Example
When an AJAX request completes successfully, trigger an alert box:
$(document).ajaxSuccess(function(){
alert("AJAX request completed");
});
Try it yourself »
Definition and Usage
The ajaxSuccess() method specifies the function to run when an AJAX request completes successfully.
Note:As of jQuery version 1.8, this method is only attached to the document.
Syntax
$(document).ajaxSuccess(function(event,xhr,options))
| Parameter | Description |
|---|---|
| function(event,xhr,options) | Required. Specifies the function to run if the request succeeds. Extra parameters:
|
More Examples
Using the options parameter
How to use the options parameter to restrict the function to use AJAX requests for a specific file.
Other Extensions
jQuery AJAX Methods