removeDelegateListener
Remove a handler for an event for all elements that match the selector.
removeDelegateListener( target, eventType, selector, handler )
// Prevents all anchor elements from changing the page
function handler(event) {
event.preventDefault();
}
domEvents.addDelegateListener(document.body,"click", "a", handler);
domEvents.removeDelegateListener(document.body,"click", "a", handler);
Parameters
- root
{DomEventTarget}
:The html element to listen to events that match selector within.
- eventType
{String}
:The event name to listen to.
- selector
{String}
:A selector to filter the elements that trigger the event.
- handler
{function}
:A function that was previously passed to
addDelegateListener
.