ralix
ralix copied to clipboard
Add a new helper method to be able to remove events listeners
To be able to remove all listeners of a type/types given an element/array/query selector.
As we already have the on method it will be consistent to have a method to remove the listeners.
PROPOSED SOLUTION
To remove a specific eventListener:
unbind(elements, events, function)
To remove all eventListeners:
unbind(elements, events)
Arguments:
- elements: Element / Array of Elements / Query selector
- events: String with the type of events to remove
- function: eventListener to be removed. If not added all eventListeners of the given types will be removed.