.ajaxStart()The .ajaxStart() method in jQuery is used to register a handler to be called when the first Ajax request begins.
.ajaxStart() syntax.ajaxStart(handler)
handler is a function to call when the first Ajax request begins.
.ajaxStart() exampleHTML
<button id="ajaxReq">Ajax Request</button> <div id="result"></div> <div id="msg"></div>
jQuery
$( "#ajaxReq" ).click(function() {
$( "#result" ).load( "/res/test/ajax/1.html" );
});
$( document ).ajaxStart(function() {
$( "#msg" ).append( "<p>Triggered ajaxStart handler:before sending</p>" );
});
