.ajaxStop()
The .ajaxStop()
method in jQuery is used to register a handler to be called when all Ajax requests have completed.
.ajaxStop()
syntax.ajaxStop(handler)
handler
is a function to call.
.ajaxStop()
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 ).ajaxStop(function() { $( "#msg" ).append( "<p>Triggered ajaxStop handler</p>" ); });