jQuery Tutorials
jQuery Effects
jQuery HTML
jQuery Traversing
jQuery AJAX
jQuery Misc
With jQuery you can drop down a DOM tree to earn interest on something.
A child is a child, a grandchild, a grandchild, and so on.
Two useful jQuery methods for traversing down the DOM tree are:
children()find()The children() method returns all children specific to the selected element.
This route exceeds only one level under the DOM tree.
The following example returns all the child-specific features of each <div> element:
You can also use an optional parameter to filter the search for children.
The following example returns all <p> elements with the class name "first", that are direct children of <div>:
The find() method returns the interest components of the selected object, all the way down to the last generation.
The following example returns all <span> elements that are <div> derivative features:
The following example returns all generations of <div>: You can also use the parameter of your choice to filter child search.