public class JQuery extends Object implements org.apache.wicket.util.io.IClusterable
| Modifier and Type | Class and Description |
|---|---|
static class |
JQuery.AbstractFunction
A simple implementation of
IFunction that allows you to chain
function parameters in a javascript safe way. |
static class |
JQuery.ClosestJqueryFunction
java abstraction of jquery closest function
|
static class |
JQuery.ConfigurableFunction
a configurable function with one parameter (an
AbstractConfig) and without body |
static class |
JQuery.EachJqueryFunction
java abstraction of jquery each function
|
static class |
JQuery.JavaScriptInlineFunction
simple class to represent a javascript function.
|
static class |
JQuery.OnJqueryFunction
java abstraction of JQuery on function.
|
static class |
JQuery.SimpleFunction
a simple function without params and body
|
| Modifier and Type | Method and Description |
|---|---|
static JQuery |
$(Attr selector)
helper method to allow a jquery like code style
JQuery.
|
static JQuery |
$(CharSequence selector)
helper method to allow a jquery like code style.
|
static JQuery |
$(org.apache.wicket.Component component)
helper method to allow a jquery like code style
|
static JQuery |
$(org.apache.wicket.Component component,
Attr... additionalSelector)
helper method to allow a jquery like code style
|
static JQuery |
$(org.apache.wicket.Component component,
CharSequence... additionalSelector)
helper method to allow a jquery like code style
|
org.apache.wicket.markup.head.OnDomReadyHeaderItem |
asDomReadyScript() |
static Attr |
auto(Object value)
creates a auto detect attribute
|
String |
build() |
JQuery |
chain(CharSequence functionName)
adds a chained function to this jquery instance
|
JQuery |
chain(CharSequence functionName,
Config config,
Config... extraConfigs)
adds a chained function to this jquery instance
|
JQuery |
chain(IFunction function)
adds a chained function to this jquery instance
|
JQuery |
closest(Attr selector)
For each element in the set, get the first element that matches the selector by testing the element itself and
traversing up through its ancestors in the DOM tree.
|
JQuery |
closest(CharSequence selector)
For each element in the set, get the first element that matches the selector by testing the element itself and
traversing up through its ancestors in the DOM tree.
|
String |
get() |
static Attr.MarkupId |
markupId(CharSequence markupId)
creates a quoted markup id selector
|
static Attr.MarkupId |
markupId(org.apache.wicket.Component component)
creates a quoted markup id selector
|
JQuery |
on(Attr events,
Attr selector,
JQuery.JavaScriptInlineFunction handler)
Attach an event handler function for one or more events to the selected elements.
|
JQuery |
on(Attr events,
JQuery.JavaScriptInlineFunction handler)
Attach an event handler function for one or more events to the selected elements.
|
JQuery |
on(CharSequence events,
CharSequence selector,
JQuery.JavaScriptInlineFunction handler)
Attach an event handler function for one or more events to the selected elements.
|
JQuery |
on(CharSequence events,
JQuery.JavaScriptInlineFunction handler)
Attach an event handler function for one or more events to the selected elements.
|
static Attr |
plain(CharSequence value)
creates a plain attribute without quotes
|
static Attr |
quoted(CharSequence value)
creates a quoted attribute
|
public static Attr quoted(CharSequence value)
value - the selectorpublic static Attr plain(CharSequence value)
value - the selectorpublic static Attr.MarkupId markupId(org.apache.wicket.Component component)
component - the component to extract markup idpublic static Attr.MarkupId markupId(CharSequence markupId)
markupId - the markup idpublic static Attr auto(Object value)
value - the selectorpublic static JQuery $(CharSequence selector)
JQuery.$("selector") // = $('selector')
selector - The jquery selectorpublic static JQuery $(Attr selector)
JQuery.$(plain("document")) // = $(document)
selector - The jquery selectorpublic static JQuery $(org.apache.wicket.Component component)
component - The markup id of given component is used as jquery selectorpublic static JQuery $(org.apache.wicket.Component component, CharSequence... additionalSelector)
component - The markup id of given component is used as jquery selectoradditionalSelector - an additional initial selectorpublic static JQuery $(org.apache.wicket.Component component, Attr... additionalSelector)
component - The markup id of given component is used as jquery selectoradditionalSelector - an additional initial selectorpublic JQuery chain(IFunction function)
function - the function to addpublic JQuery on(CharSequence events, JQuery.JavaScriptInlineFunction handler)
events parameter
will be quoted.events - One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".handler - A function to execute when the event is triggered. The value false is also allowed as a shorthand for
a function that simply does return false.public JQuery on(CharSequence events, CharSequence selector, JQuery.JavaScriptInlineFunction handler)
events and
selector parameter will be quoted.events - One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".selector - A selector string to filter the descendants of the selected elements that trigger the event.
If the selector is null or omitted, the event is always triggered when it reaches the selected element.handler - A function to execute when the event is triggered. The value false is also allowed as a shorthand for
a function that simply does return false.public JQuery on(Attr events, Attr selector, JQuery.JavaScriptInlineFunction handler)
events - One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".selector - A selector string to filter the descendants of the selected elements that trigger the event.
If the selector is null or omitted, the event is always triggered when it reaches the selected element.handler - A function to execute when the event is triggered. The value false is also allowed as a shorthand for
a function that simply does return false.public JQuery on(Attr events, JQuery.JavaScriptInlineFunction handler)
events - One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".handler - A function to execute when the event is triggered. The value false is also allowed as a shorthand for
a function that simply does return false.public JQuery closest(CharSequence selector)
selector - the selector to use (will be quoted).public JQuery closest(Attr selector)
selector - the selector to use.public JQuery chain(CharSequence functionName)
functionName - the function to addpublic String get()
public String build()
public org.apache.wicket.markup.head.OnDomReadyHeaderItem asDomReadyScript()
OnDomReadyHeaderItem instancepublic JQuery chain(CharSequence functionName, Config config, Config... extraConfigs)
functionName - the function to addconfig - the function configurationCopyright © 2014. All Rights Reserved.