Let say I have a simple function like this.
$('body').ajaxSuccess(
function(){alert('global');}
);
$.post('http://www.google.com',
{ name: "John", time: "2pm" } ,
function(data,s,xhr) {
alert('local');
}
);
It is possible to make the global ajaxSuccess() function getting invoked before the local success callback? As I want to do a global checking on the result before further processing by the local functions.
use the default ajax post instead of using the custom post handler:
http://jsfiddle.net/AT5vt/1/
didn't put it in jsfiddle as posting to google.com keeps on failing from there but that should work.
This is the ajax event invoking order