-
Notifications
You must be signed in to change notification settings - Fork 0
Collection unbind
Remove a callback function bound by eles.bind(), eles.one(), or eles.once().
Removes all callback functions for all event types for all elements in the collection
Removes all callback functions for the specified event types for all elements in the collection
eventType : A space-separated list of event types for which all handlers will be unbound
Removes a specific callback function for the specified event types for all elements in the collection
eventType : A space-separated list of event types for which
handlerwill be unbound
handler : A callback function to unbind
When called without the handler argument, ele.unbind() removes all handlers bound to the element for the specified event types.
Unbind all handlers of type click:
cy.nodes().unbind("click"); // remove all click handlers for all nodesUnbind a specific handler:
var handler = function(){ console.log("Click!"); }
cy.nodes("#n1").bind("click", handler);
// some time later
cy.nodes("#n1").unbind("click", handler);