-
Notifications
You must be signed in to change notification settings - Fork 88
Event
Wai Ho Leung edited this page Mar 30, 2014
·
10 revisions
Wiki ▸ API Reference ▸ Event
Utilities for handling event delegation, normalization between touch and mouse/trackpad events, custom events, and tying events to blocks.
# Event.on(elem, eventname, selector, handler, onceOnly)
Registers an event handler on the event target.
- elem:
- eventname:
- handler:
- onceOnly:
===
# Event.off(elem, eventname, handler)
Removes an event handler from the event target.
- elem:
- eventname:
- handler:
===
# Event.once(elem, eventname, selector, handler)
Registers an event handler on the event target and removes it immediately after the event is fired.
- elem:
- eventname:
- selector:
- handler:
===
# Event.trigger(elemOrSelector, eventname, data)
- elemOrSelector:
- eventname:
- data: