Finding Elements
Last updated
Last updated
jQuery provides many methods for navigating to an element from another element. This is called DOM traversal.
Selects any children with this class regardless of how many layers deep they are nested.
Selects any parents with this class regardless of how many layers up they are.
Selects the direct parent of the given element
Selects the direct children of the given element
Selects the next sibling of the given element
Selects the previous sibling of the given element
Selects all siblings after the current element
Selects all siblings before the current element
Selects only blog-card elements that have a class of is-active
Selects all blog-card elements that do not have a class of is-active
Selects only sections that have an h1 inside
Selects the first blog-card on the page
Selects the last blog-card on the page
Selects a blog-card based on its order on the page