Easy Tutorial
❮ Sel Attribute Beginning Value Css Scrollleft ❯

jQuery ajaxSuccess() Method

jQuery AJAX Methods

Example

Triggers an alert box when an AJAX request completes successfully:

$(document).ajaxSuccess(function(){
    alert("AJAX request completed");
});

Definition and Usage

The ajaxSuccess() method specifies a function to be run when an AJAX request completes successfully.

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


Syntax

Parameter Description
function(event, xhr, options) Required. Specifies the function to run if the request is successful. <br> Additional parameters: <br> event - Contains the event object <br> xhr - Contains the XMLHttpRequest object <br> options - Contains the options used in the AJAX request

More Examples

Using the options parameter


jQuery AJAX Methods

❮ Sel Attribute Beginning Value Css Scrollleft ❯