From the course: jQuery Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Traversing documents with jQuery

Traversing documents with jQuery - jQuery Tutorial

From the course: jQuery Essential Training

Start my 1-month free trial

Traversing documents with jQuery

- If you've done any serious web development, you're probably familiar by now with the concept that HTML pages are organized as a tree structure. The relationships between elements in the page within this tree structure can be described using family-like terms. For example, the HTML tag is said to be at the root of the document tree, and is the parent of the head and body tags. In turn, the head and body tags are also said to be children of the HTML tag and siblings of each other. This tree structure and the relationships between the elements are described using a standard API called the Document Object Model, or DOM, which is a W3C standard. It's fairly common in web development to have to write code that navigates, or to use another term, traverses the tree. For example, you might have a reference to a particular item in the tree, maybe where an event was triggered. And you need to use that reference as a starting point to get information about other elements in the tree. Of course,…

Contents