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.

Start[missing "en.views.course_landing_page.learn-jquery.course_illustration" translation]
Traversing the DOM
Lesson 1 of 1
  1. 1

    jQuery makes it easy to target HTML elements by tag name, class, and id. We can also dynamically target a single element in a given class using by accessing an event's [...] attribute. In this le...

  2. 2

    According to the DOM tree, the outermost element is the parent of all elements inside of it. Therefore, the HTML elements inside of the outer element are children. The jQuery [...] method all...

  3. 3

    In addition to the [...] method we covered in the last exercise, there are two methods you can use to select the parent and siblings of an element. [...] In the example above, the [...] meth...

  4. 4

    To select an element close to the current element, we can use jQuery's [...] method. The [...] method will travel up the DOM tree to find a specified selector closest to it. Its syntax looks l...

  5. 5

    Sometimes you don't want to target all the siblings of an element — you just want to target the next one. That's where the aptly-named [...] method comes in! The code below is HTML for a ...

  6. 6

    Sometimes we want to target an element that lives inside another, but we don't want to use the [...] method, since that might target more elements than we need. That's where the [...] method co...

  7. 7

    Understanding how elements relate to each other in the DOM makes it easy to efficiently select elements. We have covered several methods in this lesson including: - [...] to target an element's...

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo

Learn jQuery: Traversing the DOM

Start[missing "en.views.course_landing_page.learn-jquery.course_illustration" translation]