I've got a question concerning ajaxSetup
. When the script starts, I define the following:
$.ajaxSetup({
success: function(data) {
example();
}
});
Up to here everything works fine. The problem starts by using Ajaxify, which overwrites the success function.
How can I prevent this? Is there a possibilty to execute both functions or to add the setup success function to that one which I call in the main AJAX request?
Use callback function defined in ajaxsetup.
Define
$.ajaxSetup({
beforeSend : function() {
$('#ajaxLoader').show();
...
}
});
and call later
$.ajax({
beforeSend: function() {
$.ajaxSettings.beforeSend();
// do other
...
}
});
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