Namespace RichFaces.Event
Defined in: richfaces-event.js.
Constructor Attributes | Constructor Name and Description |
---|---|
RichFaces Event API container
|
Method Attributes | Method Name and Description |
---|---|
<static> |
RichFaces.Event.bind(selector, type, fn, data)
Attach a handler to an event for the elements.
|
<static> |
RichFaces.Event.bindById(id, type, fn, data)
Attach a handler to an event for the element by element id.
|
<static> |
RichFaces.Event.ready(fn)
Attach an event handler to execute when the DOM is fully loaded.
|
<static> |
RichFaces.Event.unbindById(id, type, fn)
Remove a previously-attached event handler from the elements by element id.
|
Method Detail
<static>
{function}
RichFaces.Event.bind(selector, type, fn, data)
Attach a handler to an event for the elements.
- Parameters:
- {string|DOMElement|jQuery} selector
- - jQuery elements selector
- {string} type
- - one or more JavaScript event types, such as "click" or "submit," or custom event names
- {function} fn
- - event handler
- {Object} data Optional
- - component or object with additional data It is a context for an event handler
- Returns:
- {function} function that binded to the element's event
<static>
{function}
RichFaces.Event.bindById(id, type, fn, data)
Attach a handler to an event for the element by element id.
- Parameters:
- {string} id
- - DOM element id
- {string} type
- - one or more JavaScript event types, such as "click" or "submit," or custom event names
- {function} fn
- - event handler
- {Object} data Optional
- - component or object with additional data It is a context for an event handler
- Returns:
- {function} function that binded to the element's event
<static>
{jQuery}
RichFaces.Event.ready(fn)
Attach an event handler to execute when the DOM is fully loaded.
- Parameters:
- {function} fn
- - event handler
- Returns:
- {jQuery} document element wrapped by jQuery
<static>
{jQuery}
RichFaces.Event.unbindById(id, type, fn)
Remove a previously-attached event handler from the elements by element id.
The handler will be called only once when event happened.
- Parameters:
- {string} id
- - DOM element id
- {string} type Optional
- - one or more JavaScript event types, such as "click" or "submit," or custom event names
- {function} fn Optional
- - event handler
- Returns:
- {jQuery} element wrapped by jQuery