I have some ajax calls on the document of a site that display or hide a progress bar depending on the ajax status
$(document).ajaxStart(function(){
Use local scoped Ajax Events
success: function (jQxhr, errorCode, errorThrown) { alert("Error : " + errorThrown); }, beforeSend: function () { $("#loading-image").show(); }, complete: function () { $("#loading-image").hide(); }