- Categories: jQuery Reference, jQuery Resources, Reference
Quick Reference
This is a quick reference list of jQuery traversing methods that are used to move through the selected elements.
jQuery – children() Method
The children() method returns all direct children of the selected element.
jQuery – closest() Method
The closest() method returns the first ancestor of the selected element.
jQuery – contents() Method
The contents() method returns all direct children, including text and comment nodes, of the selected element.
jQuery – each() Method
The each() method specifies a function to run for each matched element.
jQuery – eq() Method
The eq() method returns an element with a specific index number of the selected elements. 0 for element 1, 1 for element 2, 2, for element 3, etc.
jQuery – filter() Method
The filter() method returns elements that match a certain criteria. Elements that don’t match the criteria are removed from the selection.
jQuery – find() Method
The find() method returns descendant elements of the selected element.
jQuery – first() Method
The first() method returns the first element of the selected elements.
jQuery – has() Method
The has() method returns all elements that have one or more elements inside of them, that matches the specified selector.
jQuery – is() Method
The is() method checks if one of the selected elements matches the selectorElement.
jQuery – last() Method
The last() method returns the last element of the selected elements.
jQuery – next() Method
The next() method returns the next sibling element of the selected element.
jQuery – nextAll() Method
The nextAll() method returns ALL next sibling elements of the selected element.
jQuery – nextUntil() Method
The nextUntil() method returns all next sibling elements between the selector and stop. If both parameters are empty, it will return ALL next siblings.
jQuery – not() Method
The not() method returns elements that do NOT match a certain criteria. Elements that DO match are removed.
jQuery – offsetParent() Method
The offsetParent() method returns the first positioned parent element.
jQuery – parent() Method
The parent() method returns the direct parent element of the selected element.
jQuery – parents() Method
The parents() method returns all ancestor elements (parent, grandparent, great-grandparent, and so on) of the selected element.
jQuery – parentsUntil() Method
The parentsUntil() method returns all ancestor elements(parent, grandparent, great-grandparent, and so on) between the selector and stop.
jQuery – prev() Method
The prev() method returns the previous sibling element of the selected element.
jQuery – prevAll() Method
The prevAll() method returns all previous sibling elements of the selected element.
jQuery – prevUntil() Method
The prevUntil() method returns all previous sibling elements between the selector and stop.
jQuery – siblings() Method
The siblings() method returns all sibling elements of the selected element.
jQuery – slice() Method
The slice() method selects a subset of elements based on its index number.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
jQuery Books
All are affiliate links. Thank you for your support!
jQUERY NOTES:
- To use jQuery on your site, it must first be downloaded from the official jQuery site and linked to in your document
head
, or linked to via a CDN in your documenthead
- It is generally good practice to place your jQuery code/function inside the document load function so that the action takes place ONLY after the document has finished loading
- When using jQuery, single or double quotation marks are acceptable and work identically to one another; choose whichever you prefer, and stay consistent
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.