.ajaxStop() is available for this, it is launched only when the last of the current ajax requests ends. Here is the full description:
Whenever an Ajax request completes, jQuery checks for other outstanding Ajax requests. If none remain, jQuery fires the ajaxStop event. Any and all handlers registered in the .ajaxStop() method are executed at this time.
For example, if you just want to run something, the document is a good place to connect:
$(document).ajaxStop(function() {
Or you can display a message when this happens, for example:
$("#ajaxProgressDiv").ajaxStop(function() { //display for 2 seconds then fade out $(this).text("All done!").delay(2000).fadeOut(); });
source share