I have a global ajax start and stop. I am wondering though if this can be overridden by a local one as one of my ajax methods needs to do something different when ajax starts and stops
I tried like
$.ajax({
url: "test.html",
context: document.body,
success: function(){
$(this).addClass("done");
},
ajaxStart: function()
{
alert('hi');
}
});
You can refer to another function (successHandler) or even to a function by name since all global functions actually become a method of the window object. For that last solution, all you need to do is a add a string variable to you public and local pages that contains the right function name.