Tree Traversal

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

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

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

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.

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

Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.

Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.

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.

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

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

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

Get the closest ancestor element that is positioned.

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.

Tree Traversal

Leave a Reply