If I attach an event handler using .ajaxStop like this:
$(document).ajaxStop(function() { //Some code });
How to remove an event handler?
Try untying it like this:
$(document).ajaxStop(function () { $(this).unbind("ajaxStop"); //Some code });
How did i do it.
to use . off ()
Remove the event handler.
$("#elementID").off()
this removes all event handlers from the selected item
, ajaxStop() , , :
$(document).ajaxStop(function(){ // Functions there $(this).unbind("ajaxStop"); });
, $.ajax , , ajaxStop(). jQuery.