Learn jQuery: Traversing the DOM
In this course, you will learn about jQuery methods that allow you to access elements in the DOM, based on their relative position.
StartKey Concepts
Review core concepts you need to learn to master this subject
jQuery children
jQuery children
<div class="parent">
<div class="item">Child 1</div>
<div class="item">Child 2</div>
<div class="item">Child 3</div>
</div>
The jQuery .children()
method returns all child elements of a selected parent element.
This method only applies to the direct children of the parent element, and not deeper descendents.
In the example code, $('.parent').children()
would select all the .item
elements.
Traversing the DOM
Lesson 1 of 1
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory