Element
|
addClass(String className)
Add a class name to this element's class attribute.
|
Element
|
after(String html)
Insert the specified HTML into the DOM after this element (i.e.
|
Element
|
append(String html)
Add inner HTML to this element.
|
Element
|
appendChild(Node child)
Add a node to the last child of this element.
|
Element
|
appendElement(String tagName)
Create a new element by tag name, and add it as the last child.
|
Element
|
appendText(String text)
Create and append a new TextNode to this element.
|
Element
|
attr(String attributeKey, String attributeValue)
Set an attribute value on this element.
|
Element
|
before(String html)
Insert the specified HTML into the DOM before this element (i.e.
|
Element
|
child(int index)
Get a child element of this element, by its 0-based index number.
|
Elements
|
children()
Get this element's child elements.
|
String
|
className()
Gets the literal value of this element's "class" attribute, which may include multiple class names, space
separated.
|
Set<String>
|
classNames()
Get all of the element's class names.
|
Element
|
classNames(Set<String> classNames)
Set the element's class attribute to the supplied class names.
|
Element
|
clone()
Create a stand-alone, deep copy of this node, and all of its children.
|
String
|
data()
Get the combined data of this element.
|
Map<String, String>
|
dataset()
Get this element's HTML5 custom data attributes.
|
Integer
|
elementSiblingIndex()
Get the list index of this element in its element sibling list.
|
Element
|
empty()
Remove all of the element's child nodes.
|
boolean
|
equals(Object o)
|
Element
|
firstElementSibling()
Gets the first element sibling of this element.
|
Elements
|
getAllElements()
Find all elements under this element (including self, and children of children).
|
Element
|
getElementById(String id)
Find an element by ID, including or under this element.
|
Elements
|
getElementsByAttribute(String key)
Find elements that have a named attribute set.
|
Elements
|
getElementsByAttributeStarting(String keyPrefix)
Find elements that have an attribute name starting with the supplied prefix.
|
Elements
|
getElementsByAttributeValue(String key, String value)
Find elements that have an attribute with the specific value.
|
Elements
|
getElementsByAttributeValueContaining(String key, String match)
Find elements that have attributes whose value contains the match string.
|
Elements
|
getElementsByAttributeValueEnding(String key, String valueSuffix)
Find elements that have attributes that end with the value suffix.
|
Elements
|
getElementsByAttributeValueMatching(String key, String regex)
Find elements that have attributes whose values match the supplied regular expression.
|
Elements
|
getElementsByAttributeValueMatching(String key, Pattern pattern)
Find elements that have attributes whose values match the supplied regular expression.
|
Elements
|
getElementsByAttributeValueNot(String key, String value)
Find elements that either do not have this attribute, or have it with a different value.
|
Elements
|
getElementsByAttributeValueStarting(String key, String valuePrefix)
Find elements that have attributes that start with the value prefix.
|
Elements
|
getElementsByClass(String className)
Find elements that have this class, including or under this element.
|
Elements
|
getElementsByIndexEquals(int index)
Find elements whose sibling index is equal to the supplied index.
|
Elements
|
getElementsByIndexGreaterThan(int index)
Find elements whose sibling index is greater than the supplied index.
|
Elements
|
getElementsByIndexLessThan(int index)
Find elements whose sibling index is less than the supplied index.
|
Elements
|
getElementsByTag(String tagName)
Finds elements, including and recursively under this element, with the specified tag name.
|
Elements
|
getElementsContainingOwnText(String searchText)
Find elements that directly contain the specified string.
|
Elements
|
getElementsContainingText(String searchText)
Find elements that contain the specified string.
|
Elements
|
getElementsMatchingOwnText(Pattern pattern)
Find elements whose own text matches the supplied regular expression.
|
Elements
|
getElementsMatchingOwnText(String regex)
Find elements whose text matches the supplied regular expression.
|
Elements
|
getElementsMatchingText(Pattern pattern)
Find elements whose text matches the supplied regular expression.
|
Elements
|
getElementsMatchingText(String regex)
Find elements whose text matches the supplied regular expression.
|
boolean
|
hasClass(String className)
Tests if this element has a class.
|
boolean
|
hasText()
Test if this element has any text content (that is not just whitespace).
|
int
|
hashCode()
|
String
|
html()
Retrieves the element's inner HTML.
|
Element
|
html(String html)
Set this element's inner HTML.
|
String
|
id()
Get the id attribute of this element.
|
boolean
|
isBlock()
Test if this element is a block-level element.
|
Element
|
lastElementSibling()
Gets the last element sibling of this element
|
Element
|
nextElementSibling()
Gets the next sibling element of this element.
|
String
|
nodeName()
Get the node name of this node.
|
String
|
ownText()
Gets the text owned by this element only; does not get the combined text of all children.
|
final
Element
|
parent()
Gets this node's parent node.
|
Elements
|
parents()
Get this element's parent and ancestors, up to the document root.
|
Element
|
prepend(String html)
Add inner HTML into this element.
|
Element
|
prependChild(Node child)
Add a node to the start of this element's children.
|
Element
|
prependElement(String tagName)
Create a new element by tag name, and add it as the first child.
|
Element
|
prependText(String text)
Create and prepend a new TextNode to this element.
|
Element
|
previousElementSibling()
Gets the previous element sibling of this element.
|
Element
|
removeClass(String className)
Remove a class name from this element's class attribute.
|
Elements
|
select(String query)
Find elements that match the Selector query, with this element as the starting context.
|
Elements
|
siblingElements()
Get sibling elements.
|
Tag
|
tag()
Get the Tag for this element.
|
Element
|
tagName(String tagName)
Change the tag of this element.
|
String
|
tagName()
Get the name of the tag for this element.
|
String
|
text()
Gets the combined text of this element and all its children.
|
Element
|
text(String text)
Set the text of this element.
|
String
|
toString()
|
Element
|
toggleClass(String className)
Toggle a class name on this element's class attribute: if present, remove it; otherwise add it.
|
String
|
val()
Get the value of a form element (input, textarea, etc).
|
Element
|
val(String value)
Set the value of a form element (input, textarea, etc).
|
Element
|
wrap(String html)
Wrap the supplied HTML around this element.
|