return add($(selector));
}
+ /**
+ * Add the previous selection to the current selection. Useful for traversing elements, and then
+ * adding something that was matched before the last traversal.
+ */
+ public GQuery addBack() {
+ return previousObject != null ? add(previousObject) : this;
+ }
+
/**
* Adds the specified classes to each matched element.
*/
/**
* Add the previous selection to the current selection. Useful for traversing elements, and then
* adding something that was matched before the last traversal.
+ * @deprecated use addBack() instead
*/
+ @Deprecated
public GQuery andSelf() {
- return previousObject != null ? add(previousObject) : this;
+ return addBack();
}
/**
* query)
*/
public GQuery getPreviousObject() {
- return previousObject;
+ return end();
}
private native Element getPreviousSiblingElement(Element elem) /*-{