Traversing

jQuery

Category: Traversing


.closest()

For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.

.filter()

Reduce the set of matched elements to those that match the selector or pass the function’s test.

.find()

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

.has()

Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

.is()

Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

.map()

Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

.next()

Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

.nextUntil()

Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.

.parentsUntil()

Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.

.prev()

Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.

.prevUntil()

Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.