My question is a little bit strange but I "need" to internal purpose update the $.ajax function.
In the original jQuery code, there is:
ajax: function( origSettings ) {
// Some code
function success() {
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
s.success.call( callbackContext, data, status, xhr );
}
// Fire the global callback
if ( s.global ) {
trigger( "ajaxSuccess", [xhr, s] );
}
}
}
And I would like change the internal success
function to :
ajax: function( origSettings ) {
// Some code
function success() {
// Fire the global callback
if ( s.global ) {
trigger( "ajaxSuccess", [xhr, s] );
}
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
s.success.call( callbackContext, data, status, xhr );
}
}
}
Trigger changes in this order is more normal and adapted for me...
How can I do this properly ? (If I can...)
Thanks.