jQuery Traversing Methods


Method Description
add() Elements are added to the collection of matching elements.
addBack() The previous set of items is added to the present set.
andSelf() In version 1.8, this was deprecated. An abbreviation for addBack().
children() All direct children of the specified element are returned.
closest() The first ancestor of the specified element is returned.
contents() All immediate descendants of the specified element (including text and comment nodes) are returned.
each() For each matching element, a function is executed.
end() The most recent filtering action in the current chain is terminated, and the set of matched items is returned to its former state.
eq() Returns an element with the specified elements' index number.
filter() Reduce the matched items set to those that match the selector or pass the function's condition.
find() The descendent elements of the specified element are returned.
first() The first element of the chosen items is returned.
has() Returns all items that include one or more components.
is() This function compares the set of matched items to a selector/element/jQuery object and returns true if at least one of these elements matches the provided inputs.
last() Returns the final element of the items chosen.
map() Each element in the matched set is sent through a function, resulting in a new jQuery object containing the return values.
next() The next sibling element of the specified element is returned.
nextAll() Returns the chosen element's next sibling elements.
nextUntil() All next sibling components between two specified parameters are returned.
not() Elements that do not meet a set of criteria are returned.
offsetParent() The first positioned parent element is returned.
parent() The immediate parent element of the chosen element is returned.
parents() All ancestor elements of the specified element are returned.
parentsUntil() Returns all ancestor items shared by two parameters.
prev() The preceding sibling element of the specified element is returned.
prevAll() All preceding sibling items of the specified element are returned.
prevUntil() All previous sibling components between two specified inputs are returned.
siblings() All sibling elements of the specified element are returned.
slice() Reduces the set of matched elements to a subset defined by an index range.