My application has a ajaxComplete() which is defined in a generic .js file loaded in every view page. How can I overwrite this or better still avoid running it for specific $.ajax() call.
Set global: false
in your $.ajax
call.
From the API:
Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered.
Your call will look something like this:
$.ajax({
url: 'http://example.com/',
data: data,
global: false,
success: function() {
}/* etc... */
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With