0
If I have two click events assigned to an element how do I remove only one of them using jQuary?
https://www.sololearn.com/learning/2808/ With normal Javascript you use removeEventListener("event", function) method, in jQuary however how do I use the off('event') method to remove only one of the two click events.
2 Respostas
+ 7
use off() or unbind() depending on the jQuery version used:
https://api.jquery.com/off/
https://api.jquery.com/unbind/
+ 4
A) Use unbind with a namespace:
https://stackoverflow.com/questions/209029/best-way-to-remove-an-event-handler-in-jquery#210345
B) remove all and add the event you still need again