Namespace Jelo.Event

Event processing and normalization.
Defined in: Jelo.Event.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
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.
Namespace Detail
Jelo.Event
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, this refers to the event target, and arguments[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)
random jelo shots — (see all)