Classes
- API Home
- _global_
- Array
- Jelo
- Jelo.Ajax
- Jelo.Anim
- Jelo.Core
- Jelo.CSS
- Jelo.Dom
- Jelo.DragDrop
- Jelo.Env
- Jelo.Event
- Jelo.JSON
- Jelo.Widget
Namespace Jelo.Event
Event processing and normalization.
Defined in: Jelo.Event.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Jelo.Event.add(el, ev, fn)
Starts listening for an event.
|
| <static> |
Jelo.Event.addLive(selector, event, fn)
Listens for an event on all elements which match a given CSS selector, throughout the life of the page.
|
| <static> |
Jelo.Event.remove(el, ev, fn)
Stops listening for an event.
|
| <static> |
Jelo.Event.removeLive(event, fn)
Removes a delegate event listener.
|
Method Detail
<static>
Jelo.Event.add(el, ev, fn)
Starts listening for an event. Shortcut:
Jelo.un(el, ev, fn)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to listen on.
- {String} ev
- Which event to listen for.
- {Function} fn
- Code to execute when the event occurs. The execution context ("this") is the element on which the event occurred, and the only argument to this handler is the event object.
<static>
{Function}
Jelo.Event.addLive(selector, event, fn)
Listens for an event on all elements which match a given CSS selector, throughout the life of the page. New elements that match will automatically be caught.
- Parameters:
- {String} selector
- The valid CSS selector to match against.
- {String} event
- An interactive event, such as 'click', 'keydown', 'mousemove', etc. Non-interactive events (such as 'change' or 'load') may not be caught.
- {Function} fn
- Your event handler. In the handler,
thisrefers to the event target, andarguments[0]is the event itself.
- Returns:
- {Function} The delegate function wrapped around the supplied event handler. Jelo.Event.removeLive
<static>
Jelo.Event.remove(el, ev, fn)
Stops listening for an event. Shortcut:
Jelo.un(el, ev, fn)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to stop listening on.
- {String} ev
- Which event to stop listening for.
- {Function} fn
- The handler previously attached to the supplied element.
<static>
Jelo.Event.removeLive(event, fn)
Removes a delegate event listener. See Jelo.Event.addLive.
- Parameters:
- {String} event
- Which event to stop handling.
- {Function} fn
- Which listener to stop executing when the supplied event occurs. NOTE: This is the function returned by Jelo.Event.addLive, not the function supplied to it.
- recent changes — (see all)
-
- Sep 14, 2010 — Simplified DragDrop.
- Jul 19, 2010 — Fixed typo preventing reliably aborting pending Ajax requests.
- Jun 17, 2010 — Fixed a conflict preventing Easing.SWINGOUT and Easing.SWINGBOTH from running simultaneously.
- Apr 22, 2010 — Added Array support to CSS.toggleClass.
- random jelo shots — (see all)
