jquery listen for ajax to complete code example
Example: all ajaxcomplete event
//when document load and complete all ajax response this event will fire only one time
$(document).ajaxStop(function(){
alert("All AJAX requests completed");
});
//when document load and complete all ajax response this event will fire only one time
$(document).ajaxStop(function(){
alert("All AJAX requests completed");
});