If I attach an event handler using .ajaxStop like this:
$(document).ajaxStop(function() {
//Some code
});
How do I remove that event handler?
Try unbinding it, like so:
$(document).ajaxStop(function () {
$(this).unbind("ajaxStop");
//Some code
});
It's how I've been doing it.
use .off()
Remove an event handler.
$("#elementID").off()
this removes all event handler from the selected element
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