jQuery Traversing Methods

jquery-javascript

jQuery provides different traversing methods to help you select HTML elements in a page document randomly. Most of the Traversing Methods do not change the jQuery object and they are used to filter out HTML elements based on given conditions.

 

These are the commonly used jQuery Traversing Methods:

 

MethodDescription
add()Adding elements to the set of matched elements
addBack()adding previous set of elements to the current set
andSelf()Deprecated in version 1.8. An alias for addBack()
children()Returning all direct children of the selected element
closest()Returning the first ancestor of the selected element
contents()Returning all direct children of the selected element (including text and comment nodes)
map()Pass each element in the matched set through a function, producing a new jQuery object containing the return values
next()Returning the next sibling element of the selected element
nextAll()NextAll() will return all next sibling elements of the selected element
nextUntil()NextUntil() will return all next sibling elements between two given arguments
not()Removing elements from the set of matched elements
offsetParent()Returning  first positioned parent element
parent()Returning direct parent element of the selected element
each()Executing function for each matched element
end()Ending the most recent filtering operation in the current chain, and return the set of matched elements to its previous state
eq()Returning an element with a specific index number of the selected elements
filter()Reducing the set of matched elements to those that match the selector or pass the function’s test
find()Returning descendant elements of the selected element
first()Returning the first element of the selected elements
has()Returning all elements that have one or more elements inside of them
is()Check 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()Neturn the last element of the selected elements
parents()Return all ancestor elements of the selected element
parentsUntil()Returning all ancestor elements between two given arguments
prev()Returning previous sibling element of the selected element
prevAll()Returning all previous sibling elements of the selected element
prevUntil()Returning all previous sibling elements between two given arguments
siblings()Returning all sibling elements of the selected element
slice()Reducing the set of matched elements to a subset specified by a range of indices

 

 

For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @ :

Email – [email protected]
Mobile No. – 09305235027 – tnt

Leave a Comment