Class EventsHelper
java.lang.Object
org.wicketstuff.wiquery.core.javascript.helper.EventsHelper
$Id: EventsHelper.java 1714 2011-09-22 20:38:30Z hielke.hoeve $
Helper to bind javascript scope and events
- Since:
- 1.0.2
- Author:
- Julien Roche
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChainableStatementbind(EventLabel eventLabel, JsScope jsScope) Binds a handler to one or more events (like click) for each matched element.static ChainableStatementblur()Triggers the blur event of each matched element.static ChainableStatementBind a function to the blur event of each matched element.static ChainableStatementchange()Triggers the change event of each matched element.static ChainableStatementBind a function to the change event of each matched element.static ChainableStatementclick()Triggers the click event of each matched element.static ChainableStatementBind a function to the click event of each matched element.static ChainableStatementdblclick()Triggers the dblclick event of each matched element.static ChainableStatementBind a function to the dblclick event of each matched element.static ChainableStatementdie(EventLabel eventLabel, JsScope jsScope) This does the opposite of live, it removes a bound live event.static ChainableStatementerror()Triggers the error event of each matched element.static ChainableStatementBind a function to the error event of each matched element.static ChainableStatementfocus()Triggers the focus event of each matched element.static ChainableStatementBind a function to the focus event of each matched element.static ChainableStatementSimulates hovering (moving the mouse on, and off, an object).static ChainableStatementkeydown()Triggers the keydown event of each matched element.static ChainableStatementBind a function to the keydown event of each matched element.static ChainableStatementkeypress()Triggers the keypress event of each matched element.static ChainableStatementBind a function to the keypress event of each matched element.static ChainableStatementkeyup()Triggers the keyup event of each matched element.static ChainableStatementBind a function to the keyup event of each matched element.static ChainableStatementlive(EventLabel eventLabel, JsScope jsScope) Binds a handler to an event (like click) for all current - and future - matched element.static ChainableStatementBind a function to the load event of each matched element.static ChainableStatementBind a function to the mousedown event of each matched element.static ChainableStatementmouseenter(JsScope jsScope) Bind a function to the mouseenter event of each matched element.static ChainableStatementmouseleave(JsScope jsScope) Bind a function to the mouseleave event of each matched element.static ChainableStatementBind a function to the mousemove event of each matched element.static ChainableStatementBind a function to the mouseout event of each matched element.static ChainableStatementBind a function to the mouseover event of each matched element.static ChainableStatementBind a function to the mouseup event of each matched element.static ChainableStatementone(EventLabel eventLabel, JsScope jsScope) Binds a handler to one or more events to be executed once for each matched element.static ChainableStatementBinds a function to be executed whenever the DOM is ready to be traversed and manipulated.static ChainableStatementBind a function to the scroll event of each matched element.static ChainableStatementselect()Triggers the select event of each matched element.static ChainableStatementBind a function to the select event of each matched element.static ChainableStatementsubmit()Triggers the submit event of each matched element.static ChainableStatementBind a function to the submit event of each matched element.static ChainableStatementToggle among two function calls every other click.static ChainableStatementToggle among two or more function calls every other click.static ChainableStatementtrigger(EventLabel eventLabel) Trigger an event on every matched element.static ChainableStatementtrigger(EventLabel eventLabel, CharSequence... data) Trigger an event on every matched element.static ChainableStatementtriggerHandler(EventLabel eventLabel) Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.static ChainableStatementtriggerHandler(EventLabel eventLabel, CharSequence... data) Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.static ChainableStatementunbind(EventLabel eventLabel, JsScope jsScope) This does the opposite of bind, it removes bound events from each of the matched elements.static ChainableStatementBind a function to the unload event of each matched element.
-
Constructor Details
-
EventsHelper
public EventsHelper()
-
-
Method Details
-
bind
Binds a handler to one or more events (like click) for each matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
blur
Triggers the blur event of each matched element.- Returns:
- the jQuery code
-
blur
Bind a function to the blur event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
change
Triggers the change event of each matched element.- Returns:
- the jQuery code
-
change
Bind a function to the change event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
click
Triggers the click event of each matched element.- Returns:
- the jQuery code
-
click
Bind a function to the click event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
dblclick
Triggers the dblclick event of each matched element.- Returns:
- the jQuery code
-
dblclick
Bind a function to the dblclick event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
die
This does the opposite of live, it removes a bound live event.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
error
Triggers the error event of each matched element.- Returns:
- the jQuery code
-
error
Bind a function to the error event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
focus
Triggers the focus event of each matched element.- Returns:
- the jQuery code
-
focus
Bind a function to the focus event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
hover
Simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.- Parameters:
over- Scope to use on "over"out- Scope to use on "out"- Returns:
- the jQuery code
-
keydown
Triggers the keydown event of each matched element.- Returns:
- the jQuery code
-
keydown
Bind a function to the keydown event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
keypress
Triggers the keypress event of each matched element.- Returns:
- the jQuery code
-
keypress
Bind a function to the keypress event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
keyup
Triggers the keyup event of each matched element.- Returns:
- the jQuery code
-
keyup
Bind a function to the keyup event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
live
Binds a handler to an event (like click) for all current - and future - matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
load
Bind a function to the load event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mousedown
Bind a function to the mousedown event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseenter
Bind a function to the mouseenter event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseleave
Bind a function to the mouseleave event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mousemove
Bind a function to the mousemove event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseout
Bind a function to the mouseout event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseover
Bind a function to the mouseover event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseup
Bind a function to the mouseup event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
one
Binds a handler to one or more events to be executed once for each matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
ready
Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
scroll
Bind a function to the scroll event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
select
Triggers the select event of each matched element.- Returns:
- the jQuery code
-
select
Bind a function to the select event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
submit
Triggers the submit event of each matched element.- Returns:
- the jQuery code
-
submit
Bind a function to the submit event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
toggle
Toggle among two function calls every other click.- Parameters:
jsScope- Scope to usejsScope2- Scope to use- Returns:
- the jQuery code
-
toggle
Toggle among two or more function calls every other click.- Parameters:
jsScope- Scope to usejsScope2- Scope to usejsScopes- Additional functions- Returns:
- the jQuery code
-
trigger
Trigger an event on every matched element.- Parameters:
eventLabel- Event- Returns:
- the jQuery code
-
trigger
Trigger an event on every matched element.- Parameters:
eventLabel- Eventdata- Data for the scope- Returns:
- the jQuery code
-
triggerHandler
Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.- Parameters:
eventLabel- Event- Returns:
- the jQuery code
-
triggerHandler
Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.- Parameters:
eventLabel- Eventdata- Data for the scope- Returns:
- the jQuery code
-
unbind
This does the opposite of bind, it removes bound events from each of the matched elements.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
unload
Bind a function to the unload event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-