Event

Methods

# (inner) delegate(eventNames, callback) → {jLight}

[DEPRECATED] Delegates event handlers to elements.
Parameters:
Name Type Description
eventNames string Space separated list of event names
callback function The function to execute when the event occurs
Deprecated:
  • Will be removed in version 1.2.0, use jLight.on instead
Source:
Tutorials:
Returns:
jLight collection
Type
jLight

# (inner) off(eventNames, ?callback) → {jLight}

Removes event handlers from elements.
Parameters:
Name Type Attributes Description
eventNames string Space separated list of event names
callback function <optional>
The function to remove from being executed when the event occurs
Source:
Tutorials:
Returns:
jLight collection
Type
jLight

# (inner) on(eventNames, callbackOrSelector, ?delegatedCallbackOrOptions, ?options) → {jLight}

Adds event handlers to elements.
Parameters:
Name Type Attributes Description
eventNames string Space separated list of event names
callbackOrSelector eventCallback The function to execute when the event occurs or a selector to delegate events to children of the current collections elements
delegatedCallbackOrOptions eventCallback | Object <optional>
The callback to run when the event is delegated or the options to apply to the listener
options Object <optional>
The options to apply to the listener
Source:
Tutorials:
Returns:
jLight collection
Type
jLight

# (inner) once(eventNames, callbackOrSelector, ?delegatedCallbackOrOptions, ?options) → {jLight}

Adds event handlers to elements fo one time execution.
Parameters:
Name Type Attributes Description
eventNames string Space separated list of event names
callbackOrSelector eventCallback The function to execute when the event occurs or a selector to delegate events to children of the current collections elements
delegatedCallbackOrOptions eventCallback | Object <optional>
The callback to run when the event is delegated or the options to apply to the listener
options Object <optional>
The options to apply to the listener
Source:
Tutorials:
Returns:
jLight collection
Type
jLight

# (inner) trigger(eventNames, ?jLightEventData) → {jLight}

Triggers events on the collections elements.
Parameters:
Name Type Attributes Description
eventNames string Space separated list of event names
jLightEventData * <optional>
Custom data passed to the event
Source:
Tutorials:
Returns:
jLight collection
Type
jLight

# (inner) undelegate(eventNames, callback) → {jLight}

[DEPRECATED] Undelegates event handlers from elements.
Parameters:
Name Type Description
eventNames string Space separated list of event names
callback function The function to remove
Deprecated:
  • Will be removed in version 1.2.0, use jLight.off instead
Source:
Tutorials:
Returns:
jLight collection
Type
jLight