You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the only way to unbind an event is if the callback is passed to .off() specifically. If several functions need to be unbound, .off() would need to be called for each of them individually. Even worse, if the event callback is defined as an anonymous function there is no way to remove it.
It would be convenient if .on() stored all of the events being bound so they could later be unbound without passing a specific callback. For example:
$('.element').on('click',function(){// This can't be removed!});// This would be convenient!$('body').off();
The text was updated successfully, but these errors were encountered:
Currently the only way to unbind an event is if the callback is passed to .off() specifically. If several functions need to be unbound, .off() would need to be called for each of them individually. Even worse, if the event callback is defined as an anonymous function there is no way to remove it.
It would be convenient if .on() stored all of the events being bound so they could later be unbound without passing a specific callback. For example:
The text was updated successfully, but these errors were encountered: