"); }); ``` "> "); }); ``` " />
Easy Tutorial
❮ Misc Unique Sel Onlychild ❯

jQuery ajaxStart() Method

jQuery AJAX Methods

Example

Display a "loading" indicator when an AJAX request starts:

$(document).ajaxStart(function(){
    $(this).html("<img src='demo_wait.gif' />");
});

Definition and Usage

The ajaxStart() method specifies a function to be run when an AJAX request starts.

Note: As of jQuery version 1.8, this method only attaches to the document.


Syntax

Parameter Description
function() Required. Specifies the function to run when an AJAX request starts.

jQuery AJAX Methods

❮ Misc Unique Sel Onlychild ❯