jQuery Traversing Methods

Last Updated Jul 21, 2015, 12:00:06 PM





jQuery Traversing Methods

The following table lists all the jQuery Traversal Methods.

Method Description Example
add Adds elements to the set of matched elements Try It
addBack Adds the previous set of elements to the current set Try It
children Returns all direct children of the selected element Try It
closest Returns the first ancestor of the selected element Try It
each Executes a function for each matched element Try It
eq Returns an element with a specific index number of the selected elements Try It
find Returns descendant elements of the selected element Try It
prev Returns the previous sibling element of the selected element Try It

jQuery Traversal filter Methods

The following table lists all the jQuery Traversal Filter Methods.

Method Description Example
filter The filter() method returns elements that match a certain criteria. Try It
first Returns the first element of the selected elements Try It
last Returns the last element of the selected elements Try It
has Returns all elements that have one or more elements inside of them Try It
slice Reduces the set of matched elements to a subset specified by a range of indices Try It



jQuery Traversal References

jQuery Traversal Reference

jQuery Basic Traversing

jQuery Traversal Filters

jQuery Traversing Methods

Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 21, 2015, 12:00:06 PM