Home >>jQuery Tutorial >jQuery Traversing Methods
Allow you to iterate DOM elements in a DOM hierarchy The jQuery traversing methods are used. Some Important DOM manipulation methods are each(), children(), find(), first(), parent(), next(), previous(), siblings() etc.
Method | Description |
---|---|
add() | It is used to adds elements to the set of matched elements |
addBack() | This method is used to adds the previous set of elements to the current set |
andSelf() | Deprecated in version 1.8. An alias for addBack() |
children() | It is used to returns all direct children of the selected element |
closest() | It is used to returns the first ancestor of the selected element |
contents() | This method is used to returns all direct children of the selected element (including text and comment nodes) |
each() | It helps to Executes a function for each matched element |
end() | This method is used to Ends the most recent filtering operation in the current chain |
eq() | It is used to returns an element with a specific index number of the selected elements |
filter() | It helps to reduce the set of matched elements to those that match the selector or pass the function's test |
find() | It is used to returns descendant elements of the selected element |
first() | It is used to returns the first element of the selected elements |
has() | This method is used to eturns all elements that have one or more elements inside of them |
is() | It is used to checks the set of matched elements against a selector/element/jQuery object, and return true if at least one of these elements matches the given arguments |
last() | This method returns the last element of the selected elements |
map() | It help to Passes each element in the matched set through a function, producing a new jQuery object containing the return values |
next() | It is used to returns the next sibling element of the selected element |
nextAll() | This method is used to returns all next sibling elements of the selected element |
nextUntil() | It is used to returns all next sibling elements between two given arguments |
not() | This method helps to returns elements that do not match a certain criteria |
offsetParent() | It is used to returns the first positioned parent element |
parent() | It is used to returns the direct parent element of the selected element |
parents() | This method helps to returns all ancestor elements of the selected element |
parentsUntil() | It is used to returns all ancestor elements between two given arguments |
prev() | It is used to returns the previous sibling element of the selected element |
prevAll() | This method returns all previous sibling elements of the selected element |
prevUntil() | This method helps to returns all previous sibling elements between two given arguments |
siblings() | It is used to returns all sibling elements of the selected element |
slice() | It is used to reduces the set of matched elements to a subset specified by a range of indices |