aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorJulien Dramaix <julien.dramaix@gmail.com>2014-11-17 18:00:30 +0100
committerJulien Dramaix <julien.dramaix@gmail.com>2014-11-17 18:00:30 +0100
commit8c445b0fc9b62c0ae14da9b9708d9c2a5c5b2408 (patch)
tree97488a5688bec566a308e3737602f7265e55c42b /gwtquery-core
parent221bb40ed0675d42d9dcd06bd84569a711a22799 (diff)
parent4653746c44d2aab84cae436664f0aee4c9327d11 (diff)
downloadgwtquery-8c445b0fc9b62c0ae14da9b9708d9c2a5c5b2408.tar.gz
gwtquery-8c445b0fc9b62c0ae14da9b9708d9c2a5c5b2408.zip
Merge pull request #307 from ArcBees/spg_node_multi_selector
Add varargs Node selector
Diffstat (limited to 'gwtquery-core')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index ddf72475..32a30e1f 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -286,7 +286,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Create a new GQuery given a list of nodes, elements or widgets
+ * Create a new GQuery given a list of {@link com.google.gwt.dom.client.Node} or
+ * {@link com.google.gwt.user.client.ui.IsWidget}
*/
public static GQuery $(List<?> nodesOrWidgets) {
JsNodeArray elms = JsNodeArray.create();
@@ -408,6 +409,13 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
+ * Wrap a GQuery around one node or an array of existing ones.
+ */
+ public static GQuery $(Node... nodes) {
+ return $(Arrays.asList(nodes));
+ }
+
+ /**
* Create an empty JSON object.
*/
public static Properties $$() {
@@ -2545,7 +2553,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
return -1;
}
-
+
/**
* Return the position of the first matched element in relation with its sibblings.
*/
@@ -3206,14 +3214,14 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
return new GQuery(offParent);
}
-
+
/**
* Attach an event handler function for one or more events to the selected elements.
*/
public GQuery on(String eventName, Function... funcs) {
return bind(eventName, funcs);
}
-
+
/**
* Attach an event handler function for one or more events to the selected elements.
*/
@@ -3234,7 +3242,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
public GQuery on(String eventName, String selector, Object data, Function... funcs) {
return delegate(selector, eventName, data, funcs);
}
-
+
/**
* Remove all event handlers.
*/
@@ -3248,7 +3256,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
public GQuery off(String eventName) {
return unbind(eventName, null);
}
-
+
/**
* Remove an event handler
*/
@@ -3262,7 +3270,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
public GQuery off(String eventName, String selector) {
return undelegate(selector, eventName);
}
-
+
/**
* Binds a handler to a particular Event (like Event.ONCLICK) for each matched element. The
* handler is executed only once for each element.