| Constructor and Description |
|---|
JQuery() |
| Modifier and Type | Method and Description |
|---|---|
static JQueryElement |
_data(JQueryElement element,
String key)
Get arbitrary data associated with the element.
|
static JQueryElement |
$() |
static JQueryElement |
$(com.google.gwt.dom.client.Element element) |
static JQueryElement |
$(com.google.gwt.dom.client.Element element,
com.google.gwt.dom.client.Element context) |
static JQueryElement |
$(com.google.gwt.dom.client.Element element,
Element context) |
static JQueryElement |
$(com.google.gwt.dom.client.Element element,
JQueryElement context) |
static JQueryElement |
$(com.google.gwt.dom.client.Element element,
com.google.gwt.user.client.ui.UIObject context) |
static JQueryElement |
$(JQueryElement element) |
static JQueryElement |
$(JQueryElement element,
com.google.gwt.dom.client.Element context) |
static JQueryElement |
$(JQueryElement element,
Element context) |
static JQueryElement |
$(JQueryElement element,
JQueryElement context) |
static JQueryElement |
$(JQueryElement element,
com.google.gwt.user.client.ui.UIObject context) |
static JQueryElement |
$(com.google.gwt.dom.client.Node element) |
static JQueryElement |
$(com.google.gwt.dom.client.Node element,
com.google.gwt.dom.client.Element context) |
static JQueryElement |
$(com.google.gwt.dom.client.Node element,
Element context) |
static JQueryElement |
$(com.google.gwt.dom.client.Node element,
JQueryElement context) |
static JQueryElement |
$(com.google.gwt.dom.client.Node element,
com.google.gwt.user.client.ui.UIObject context) |
static JQueryElement |
$(Object plainObject) |
static JQueryElement |
$(Object plainObject,
com.google.gwt.dom.client.Element context) |
static JQueryElement |
$(Object plainObject,
Element context) |
static JQueryElement |
$(Object plainObject,
JQueryElement context) |
static JQueryElement |
$(Object plainObject,
com.google.gwt.user.client.ui.UIObject context) |
static JQueryElement |
$(String selector) |
static JQueryElement |
$(String selector,
com.google.gwt.dom.client.Element context) |
static JQueryElement |
$(String selector,
Element context) |
static JQueryElement |
$(String selector,
JQueryElement context) |
static JQueryElement |
$(String selector,
com.google.gwt.user.client.ui.UIObject context) |
static <T extends com.google.gwt.user.client.ui.UIObject> |
$(T uiObject) |
static <T extends com.google.gwt.user.client.ui.UIObject> |
$(T uiObject,
com.google.gwt.dom.client.Element context) |
static <T extends com.google.gwt.user.client.ui.UIObject> |
$(T uiObject,
Element context) |
static <T extends com.google.gwt.user.client.ui.UIObject> |
$(T uiObject,
JQueryElement context) |
static <T extends com.google.gwt.user.client.ui.UIObject> |
$(T uiObject,
com.google.gwt.user.client.ui.UIObject context) |
static boolean |
contains(com.google.gwt.dom.client.Element container,
com.google.gwt.dom.client.Element contained)
Check to see if a DOM element is a descendant of another DOM element.
|
static void |
dequeue(com.google.gwt.dom.client.Element element)
Execute the next function on the queue for the matched element.
|
static void |
dequeue(com.google.gwt.dom.client.Element element,
String queueName)
Execute the next function on the queue for the matched element.
|
static Object |
each(Object[] array,
Functions.Func2<Integer,Object> callback)
A generic iterator function, which can be used to seamlessly iterate over both objects and arrays.
|
static Object |
each(Object object,
Functions.Func2<Integer,Object> callback)
A generic iterator function, which can be used to seamlessly iterate over both objects and arrays.
|
static void |
error(String message)
Takes a string and throws an exception containing it.
|
static Object |
getJSON(String url)
Load JSON-encoded data from the server using a GET HTTP request.
|
static Object |
getJSON(String url,
Functions.Func3<Object,String,Object> success)
Load JSON-encoded data from the server using a GET HTTP request.
|
static Object |
getJSON(String url,
String data)
Load JSON-encoded data from the server using a GET HTTP request.
|
static Object |
getJSON(String url,
String data,
Functions.Func3<Object,String,Object> success)
Load JSON-encoded data from the server using a GET HTTP request.
|
static Object |
getScript(String url)
Load a JavaScript file from the server using a GET HTTP request, then execute it.
|
static Object |
getScript(String url,
Functions.Func3<Object,String,Object> success)
Load a JavaScript file from the server using a GET HTTP request, then execute it.
|
static void |
globalEval(String code)
Execute some JavaScript code globally.
|
static Object[] |
grep(Object[] array,
Functions.FuncRet2<Object,Integer> function)
Finds the elements of an array which satisfy a filter function.
|
static Object[] |
grep(Object[] array,
Functions.FuncRet2<Object,Integer> function,
boolean invert)
Finds the elements of an array which satisfy a filter function.
|
static boolean |
hasData(com.google.gwt.dom.client.Element element)
Determine whether an element has any jQuery data associated with it.
|
static void |
holdReady(boolean hold)
Holds or releases the execution of jQuery's ready event.
|
static int |
inArray(Object value,
Object[] array)
Search for a specified value within an array and return its index (or -1 if not found).
|
static int |
inArray(Object value,
Object[] array,
double fromIndex)
Search for a specified value within an array and return its index (or -1 if not found).
|
static boolean |
isArray(Object obj)
Determine whether the argument is an array.
|
static boolean |
isEmptyObject(Object obj)
Check to see if an object is empty (contains no enumerable properties).
|
static boolean |
isFunction(Object obj)
Determine if the argument passed is a JavaScript function object.
|
static boolean |
isNumeric(Object value)
Determines whether its argument is a number.
|
static boolean |
isPlainObject(Object object)
Check to see if an object is a plain object (created using "{}" or "new Object").
|
static boolean |
isWindow(Object object)
Determine whether the argument is a window.
|
static boolean |
isXMLDoc(com.google.gwt.dom.client.Element node)
Check to see if a DOM node is within an XML document (or is an XML document).
|
static Object[] |
makeArray(Object object)
Convert an array-like object into a true JavaScript array.
|
static Object[] |
map(Object[] array,
Functions.FuncRet2<Object,Integer> callback)
Translate all items in an array or object to new array of items.
|
static Object[] |
map(Object object,
Functions.FuncRet2<Object,Integer> callback)
Translate all items in an array or object to new array of items.
|
static Object[] |
merge(Object[] first,
Object[] second)
Merge the contents of two arrays together into the first array.
|
static Object |
noConflict(boolean removeAll)
Relinquish jQuery's control of the $ variable.
|
static void |
noop()
An empty function.
|
static double |
now()
Return a number representing the current time.
|
static String |
param(JQueryElement obj)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static String |
param(JQueryElement obj,
boolean traditional)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static String |
param(Object obj)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static String |
param(Object[] obj)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static String |
param(Object[] obj,
boolean traditional)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static String |
param(Object obj,
boolean traditional)
Create a serialized representation of an array, a plain object, or a jQuery object suitable
for use in a URL query string or Ajax request.
|
static Object[] |
parseHTML(String data)
Parses a string into an array of DOM nodes.
|
static Object[] |
parseHTML(String data,
boolean keepScripts)
Parses a string into an array of DOM nodes.
|
static Object[] |
parseHTML(String data,
com.google.gwt.dom.client.Element context)
Parses a string into an array of DOM nodes.
|
static Object[] |
parseHTML(String data,
com.google.gwt.dom.client.Element context,
boolean keepScripts)
Parses a string into an array of DOM nodes.
|
static Object |
parseJSON(String json)
Takes a well-formed JSON string and returns the resulting JavaScript value.
|
static Object |
parseXML(String data)
Parses a string into an XML document.
|
static Object |
post(Object settings)
Load data from the server using a HTTP POST request.
|
static Object |
post(String url)
Load data from the server using a HTTP POST request.
|
static Object |
post(String url,
String data)
Load data from the server using a HTTP POST request.
|
static Object |
post(String url,
String data,
Functions.Func3<Object,String,Object> success)
Load data from the server using a HTTP POST request.
|
static Object |
post(String url,
String data,
Functions.Func3<Object,String,Object> success,
String dataType)
Load data from the server using a HTTP POST request.
|
static Functions.Func |
proxy(Functions.Func function,
Object context)
Takes a function and returns a new one that will always have a particular context.
|
static Functions.Func |
proxy(Functions.Func function,
Object context,
Object... additionalArguments)
Takes a function and returns a new one that will always have a particular context.
|
static Functions.Func |
proxy(Object context,
String name)
Takes a function and returns a new one that will always have a particular context.
|
static Functions.Func |
proxy(Object context,
String name,
Object... additionalArguments)
Takes a function and returns a new one that will always have a particular context.
|
static JQueryElement |
removeData(com.google.gwt.dom.client.Element element)
Remove a previously-stored piece of data.
|
static JQueryElement |
removeData(com.google.gwt.dom.client.Element element,
String name)
Remove a previously-stored piece of data.
|
static String |
trim(String str)
Remove the whitespace from the beginning and end of a string.
|
static String |
type(Object obj)
Determine the internal JavaScript [[Class]] of an object.
|
static com.google.gwt.dom.client.Element[] |
unique(com.google.gwt.dom.client.Element[] array)
Sorts an array of DOM elements, in place, with the duplicates removed.
|
static com.google.gwt.dom.client.Element |
window() |
public JQuery()
@JsOverlay public static com.google.gwt.dom.client.Element window()
@JsMethod(namespace="<global>") public static JQueryElement $()
@JsMethod(namespace="<global>") public static JQueryElement $(Object plainObject)
@JsMethod(namespace="<global>") public static JQueryElement $(Object plainObject, com.google.gwt.dom.client.Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(Object plainObject, Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(Object plainObject, JQueryElement context)
@JsOverlay public static JQueryElement $(Object plainObject, com.google.gwt.user.client.ui.UIObject context)
@JsMethod(namespace="<global>") public static JQueryElement $(String selector)
@JsMethod(namespace="<global>") public static JQueryElement $(String selector, com.google.gwt.dom.client.Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(String selector, Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(String selector, JQueryElement context)
@JsOverlay public static JQueryElement $(String selector, com.google.gwt.user.client.ui.UIObject context)
@JsMethod(namespace="<global>") public static JQueryElement $(JQueryElement element)
@JsMethod(namespace="<global>") public static JQueryElement $(JQueryElement element, com.google.gwt.dom.client.Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(JQueryElement element, Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(JQueryElement element, JQueryElement context)
@JsOverlay public static JQueryElement $(JQueryElement element, com.google.gwt.user.client.ui.UIObject context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Element element)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Element element, com.google.gwt.dom.client.Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Element element, Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Element element, JQueryElement context)
@JsOverlay public static JQueryElement $(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.ui.UIObject context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Node element)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Node element, com.google.gwt.dom.client.Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Node element, Element context)
@JsMethod(namespace="<global>") public static JQueryElement $(com.google.gwt.dom.client.Node element, JQueryElement context)
@JsOverlay public static JQueryElement $(com.google.gwt.dom.client.Node element, com.google.gwt.user.client.ui.UIObject context)
@JsOverlay public static <T extends com.google.gwt.user.client.ui.UIObject> JQueryElement $(T uiObject)
@JsOverlay public static <T extends com.google.gwt.user.client.ui.UIObject> JQueryElement $(T uiObject, com.google.gwt.dom.client.Element context)
@JsOverlay public static <T extends com.google.gwt.user.client.ui.UIObject> JQueryElement $(T uiObject, Element context)
@JsOverlay public static <T extends com.google.gwt.user.client.ui.UIObject> JQueryElement $(T uiObject, JQueryElement context)
@JsOverlay public static <T extends com.google.gwt.user.client.ui.UIObject> JQueryElement $(T uiObject, com.google.gwt.user.client.ui.UIObject context)
@JsMethod(namespace="$") public static JQueryElement _data(JQueryElement element, String key)
JQueryElement@JsMethod(namespace="$") public static boolean contains(com.google.gwt.dom.client.Element container, com.google.gwt.dom.client.Element contained)
container - The DOM element that may contain the other element.contained - The DOM element that may be contained by (a descendant of) the other element.@JsMethod(namespace="$") public static void dequeue(com.google.gwt.dom.client.Element element)
element - A DOM element from which to remove and execute a queued function.@JsMethod(namespace="$") public static void dequeue(com.google.gwt.dom.client.Element element, String queueName)
element - A DOM element from which to remove and execute a queued function.queueName - A string containing the name of the queue. Defaults to fx, the standard effects queue.@JsMethod(namespace="$") public static Object each(Object[] array, Functions.Func2<Integer,Object> callback)
array - The array to iterate over.callback - The function that will be executed on every object.@JsMethod(namespace="$") public static Object each(Object object, Functions.Func2<Integer,Object> callback)
object - The object to iterate over.callback - The function that will be executed on every object.@JsMethod(namespace="$") public static void error(String message)
message - The message to send out.@JsMethod(namespace="$") public static Object getJSON(String url)
url - A string containing the URL to which the request is sent.@JsMethod(namespace="$") public static Object getJSON(String url, Functions.Func3<Object,String,Object> success)
url - A string containing the URL to which the request is sent.success - A callback function that is executed if the request succeeds.@JsMethod(namespace="$") public static Object getJSON(String url, String data)
url - A string containing the URL to which the request is sent.data - A plain object or string that is sent to the server with the request.@JsMethod(namespace="$") public static Object getJSON(String url, String data, Functions.Func3<Object,String,Object> success)
url - A string containing the URL to which the request is sent.data - A plain object or string that is sent to the server with the request.success - A callback function that is executed if the request succeeds.@JsMethod(namespace="$") public static Object getScript(String url)
url - A string containing the URL to which the request is sent.@JsMethod(namespace="$") public static Object getScript(String url, Functions.Func3<Object,String,Object> success)
url - A string containing the URL to which the request is sent.success - A callback function that is executed if the request succeeds.@JsMethod(namespace="$") public static void globalEval(String code)
code - The JavaScript code to execute.@JsMethod(namespace="$") public static Object[] grep(Object[] array, Functions.FuncRet2<Object,Integer> function)
array - The array-like object to search through.function - The function to process each item against. The first argument to the function is the
item, and the second argument is the index. The function should return a Boolean value.
this will be the global window object.@JsMethod(namespace="$") public static Object[] grep(Object[] array, Functions.FuncRet2<Object,Integer> function, boolean invert)
array - The array-like object to search through.function - The function to process each item against. The first argument to the function is the
item, and the second argument is the index. The function should return a Boolean value.
this will be the global window object.invert - If "invert" is false, or not provided, then the function returns an array consisting of
all elements for which "callback" returns true. If "invert" is true, then the function
returns an array consisting of all elements for which "callback" returns false.@JsMethod(namespace="$") public static boolean hasData(com.google.gwt.dom.client.Element element)
element - A DOM element to be checked for data.@JsMethod(namespace="$") public static void holdReady(boolean hold)
hold - Indicates whether the ready hold is being requested or released@JsMethod(namespace="$") public static int inArray(Object value, Object[] array)
value - The value to search for.array - An array through which to search.@JsMethod(namespace="$") public static int inArray(Object value, Object[] array, double fromIndex)
value - The value to search for.array - An array through which to search.fromIndex - The index of the array at which to begin the search. The default is 0,
which will search the whole array.@JsMethod(namespace="$") public static boolean isArray(Object obj)
obj - Object to test whether or not it is an array.@JsMethod(namespace="$") public static boolean isEmptyObject(Object obj)
obj - The object that will be checked to see if it's empty.@JsMethod(namespace="$") public static boolean isFunction(Object obj)
obj - Object to test whether or not it is a function.@JsMethod(namespace="$") public static boolean isNumeric(Object value)
value - The value to be tested.@JsMethod(namespace="$") public static boolean isPlainObject(Object object)
object - The object that will be checked to see if it's a plain object.@JsMethod(namespace="$") public static boolean isWindow(Object object)
object - Object to test whether or not it is a window.@JsMethod(namespace="$") public static boolean isXMLDoc(com.google.gwt.dom.client.Element node)
node - The DOM node that will be checked to see if it's in an XML document.@JsMethod(namespace="$") public static Object[] makeArray(Object object)
object - Any object to turn into a native Array.@JsMethod(namespace="$") public static Object[] map(Object[] array, Functions.FuncRet2<Object,Integer> callback)
array - The Array to translate.callback - The function to process each item against. The first argument to the
function is the array item, the second argument is the index in array
The function can return any value. A returned array will be flattened
into the resulting array. Within the function, this refers to the global
(window) object. Must return an Object type.@JsMethod(namespace="$") public static Object[] map(Object object, Functions.FuncRet2<Object,Integer> callback)
object - The Object to translate.callback - The function to process each item against. The first argument to the
function is the array item, the second argument is the index in array
The function can return any value. A returned array will be flattened
into the resulting array. Within the function, this refers to the global
(window) object. Must return an Object type.@JsMethod(namespace="$") public static Object[] merge(Object[] first, Object[] second)
first - The first array-like object to merge, the elements of second added.second - The second array-like object to merge into the first, unaltered.@JsMethod(namespace="$") public static Object noConflict(boolean removeAll)
removeAll - A Boolean indicating whether to remove all jQuery variables from the
global scope (including jQuery itself).@JsMethod(namespace="$") public static void noop()
@JsMethod(namespace="$") public static double now()
@JsMethod(namespace="$") public static String param(Object[] obj)
obj - An array to serialize.@JsMethod(namespace="$") public static String param(Object obj)
obj - An object to serialize.@JsMethod(namespace="$") public static String param(JQueryElement obj)
obj - A jQuery element to serialize.@JsMethod(namespace="$") public static String param(Object[] obj, boolean traditional)
obj - An array to serialize.traditional - A Boolean indicating whether to perform a traditional "shallow" serialization.@JsMethod(namespace="$") public static String param(Object obj, boolean traditional)
obj - An object to serialize.traditional - A Boolean indicating whether to perform a traditional "shallow" serialization.@JsMethod(namespace="$") public static String param(JQueryElement obj, boolean traditional)
obj - A jQuery element to serialize.traditional - A Boolean indicating whether to perform a traditional "shallow" serialization.@JsMethod(namespace="$") public static Object[] parseHTML(String data)
data - HTML string to be parsed@JsMethod(namespace="$") public static Object[] parseHTML(String data, com.google.gwt.dom.client.Element context)
data - HTML string to be parsedcontext - Document element to serve as the context in which the HTML fragment will be created@JsMethod(namespace="$") public static Object[] parseHTML(String data, boolean keepScripts)
data - HTML string to be parsedkeepScripts - A Boolean indicating whether to include scripts passed in the HTML string@JsMethod(namespace="$") public static Object[] parseHTML(String data, com.google.gwt.dom.client.Element context, boolean keepScripts)
data - HTML string to be parsedcontext - Document element to serve as the context in which the HTML fragment will be createdkeepScripts - A Boolean indicating whether to include scripts passed in the HTML string@JsMethod(namespace="$") public static Object parseJSON(String json)
json - The JSON string to parse.@JsMethod(namespace="$") public static Object parseXML(String data)
data - a well-formed XML string to be parsed@JsMethod(namespace="$") public static Object post(String url)
url - A string containing the URL to which the request is sent.@JsMethod(namespace="$") public static Object post(String url, String data)
url - A string containing the URL to which the request is sent.data - A plain object or string that is sent to the server with the request.@JsMethod(namespace="$") public static Object post(String url, String data, Functions.Func3<Object,String,Object> success)
url - A string containing the URL to which the request is sent.data - A plain object or string that is sent to the server with the request.success - A callback function that is executed if the request succeeds. Required if
dataType is provided, but can be null in that case.@JsMethod(namespace="$") public static Object post(String url, String data, Functions.Func3<Object,String,Object> success, String dataType)
url - A string containing the URL to which the request is sent.data - A plain object or string that is sent to the server with the request.success - A callback function that is executed if the request succeeds. Required if
dataType is provided, but can be null in that case.dataType - The type of data expected from the server. Default: Intelligent Guess
(xml, json, script, text, html).@JsMethod(namespace="$") public static Object post(Object settings)
settings - A set of key/value pairs that configure the Ajax request. All properties
except for url are optional. A default can be set for any option with
$.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all
settings. Type will automatically be set to POST.@JsMethod(namespace="$") public static Functions.Func proxy(Functions.Func function, Object context)
function - The function whose context will be changed.context - The object to which the context (this) of the function should be set.@JsMethod(namespace="$") public static Functions.Func proxy(Functions.Func function, Object context, Object... additionalArguments)
function - The function whose context will be changed.context - The object to which the context (this) of the function should be set.additionalArguments - Any number of arguments to be passed to the function referenced
in the function argument.@JsMethod(namespace="$") public static Functions.Func proxy(Object context, String name)
context - The object to which the context of the function should be set.name - The name of the function whose context will be changed (should be a property
of the context object).@JsMethod(namespace="$") public static Functions.Func proxy(Object context, String name, Object... additionalArguments)
context - The object to which the context of the function should be set.name - The name of the function whose context will be changed (should be a property
of the context object).additionalArguments - Any number of arguments to be passed to the function referenced
in the function argument.@JsMethod(namespace="$") public static JQueryElement removeData(com.google.gwt.dom.client.Element element)
element - A DOM element from which to remove data.@JsMethod(namespace="$") public static JQueryElement removeData(com.google.gwt.dom.client.Element element, String name)
element - A DOM element from which to remove data.name - A string naming the piece of data to remove.@JsMethod(namespace="$") public static String trim(String str)
str - The string to trim.@JsMethod(namespace="$") public static String type(Object obj)
obj - Object to get the internal JavaScript [[Class]] of.@JsMethod(namespace="$") public static com.google.gwt.dom.client.Element[] unique(com.google.gwt.dom.client.Element[] array)
array - The Array of DOM elements.Copyright © 2017. All rights reserved.