ancestors
, and can move easily down the DOM tree it could be the descendants
or can move easily sideways it could be the sibling
of another element. jQuery traversing allows to move through different elements making use of their relations. ancestors
is a parent, grandparent, great-grandparent and so on.ancestors
of an element. See below some of the methods used to find the ancestors of an element.descendants
is child, grandchild, great-grandchild and so on.descendants
of an element. See below some of the methods used to find the descendants of an element.siblings()
: All sibling elements of the selected element is returned by this method.next()
: The next sibling element of the selected element is returned by this method.nextAll()
: All the next sibling element of the selected element is returned by this method.nextUntil()
: All the next sibling elements between two given arguments is returned by this method.prev()
: The previous sibling element of the selected element is returned by this method.prevAll()
: All the previous sibling element of the selected element is returned by this method.prevUntil()
: All the previous sibling elements between two given arguments is returned by this method.