O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Navigating jQuery Objects to Select Elements

Another important set of methods attached to a jQuery object is the DOM traversing methods. DOM traversal allows you to select elements based on their relationship to other elements. A couple of examples of DOM traversal are accessing all <p> elements that are children of <div> elements and finding a <label> element that is a sibling of an <input> element.

jQuery object provides an incredible set of methods that allow you to traverse the DOM in almost innumerable ways by allowing you to use the current selection of DOM elements in the jQuery object to select other sets of DOM elements in the tree. The following phrases provide some examples of traversing the DOM elements in jQuery objects to get to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required