}
/**
- * 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();
return $(Arrays.asList(widgets));
}
+ /**
+ * 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.
*/
}
return -1;
}
-
+
/**
* Return the position of the first matched element in relation with its sibblings.
*/
}
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.
*/
public GQuery on(String eventName, String selector, Object data, Function... funcs) {
return delegate(selector, eventName, data, funcs);
}
-
+
/**
* Remove all event handlers.
*/
public GQuery off(String eventName) {
return unbind(eventName, null);
}
-
+
/**
* Remove an event handler
*/
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.