Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Traversal

jQuery Traversal


What is traversal?

jQuery traversal, meaning "moving", is used to "find" (or select) HTML elements based on their relationship to other elements. It starts with a selection and moves along that selection until it reaches the element you desire.

The figure below shows a family tree. With jQuery traversal, you can start from the selected (current) element and easily move up (ancestors), down (descendants), and horizontally (siblings) in the family tree. This movement is called traversing the DOM.

jQuery Dimensions

Diagram explanation: