up.event
JavaScript namespace
Features to emit and observe DOM events.
up.on() listens on document or a given element, and can delegate to a selector so it also catches events from elements inserted later. It returns a function that unbinds the listener, and unbinds automatically when the element is destroyed. up.emit() emits a custom event with the given properties and returns it, so you can check whether a listener prevented it. An [up-emit] attribute emits a custom event when the element is clicked.
Features
-
Emits a custom event with the given name and properties.
-
[up-emit] ATTR
Emits a custom event when this element is clicked.
-
Builds an event with the given type and properties.
-
Prevents the event from being processed further.
-
The class of input device used to cause the current event.
-
Emits an event and returns whether no listener has prevented the default action.
-
Runs a callback when the given event is observed on the given element or its ancestors.
-
Registers an event listener to be called when the user presses the
Escapekey. -
Unbinds an event listener previously bound with
up.on(). -
Listens to a DOM event on
documentor a given element. -
Listens to an event on
documentor a given element. The event handler is called with the event target as a jQuery collection.