To know when all ajax request is completed and no other ajax activity is in process, ajaxStop()
method can be used. This event fires after .ajaxComplete() event.
<script>
$(document).ajaxStop(function () {
$("#divAjaxStop").text("ajaxStop: Ajax request stopped : ");
});
</script>
In the above code snippet, when all ajax request is complete “ajaxStop = Ajax request stopped : “ is written in the “divAjaxStop” element.
Important
Note that this event fires irrespective of ajax request is completed successfully or not. This event can be used to hide the loading message or progress bar.
Views: 6853 | Post Order: 116