Traversing DOM SubTrees (Become an expert)

Now that the book is almost at its end, you should be convinced of the jQuery's power. However, I can guarantee that we've touched only the tip of the iceberg because with jQuery you can really, really do more than that.

This section describes how many, and what are the methods that can be applied to a collection to find elements starting from a matched set. One of these methods is find(); we have come across it several times.

Getting ready

The Tree Traversal methods are:




Retrieves the children of every element in the previously created collection. If a selector is passed, only the children that match it are retrieved.


Gets the first element that matches the ...

Get Instant JQuery Selectors now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.