jQuery ajaxStop () method
Examples
When all the AJAX request is completed, triggering a prompt box:
$(document).ajaxStop(function(){
alert("All AJAX requests completed");
});
alert("All AJAX requests completed");
});
try it"
Definition and Usage
ajaxStop () method prescribed function run when all the AJAX request is complete.
When AJAX request completes, jQuery checks whether there are more AJAX requests. If no other requests are waiting to run, ajaxStop () method runs the specified function.
Note: Since jQuery version 1.8 onwards, this method is only attached to the document.
grammar
$(document).ajaxStop(function())
参数 | 描述 |
---|---|
function() | 必需。规定所有的 AJAX 请求完成时运行的函数。 |