Skip to content
Wai Ho Leung edited this page Mar 30, 2014 · 10 revisions

WikiAPI ReferenceEvent

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:
Clone this wiki locally