GoConqr has a new look! Let us know what you think.

Module 10 of 15 · Media

Traversing the DOM

Kostas Diakogiannis

Traversing the DOM

Accessing Parents, children, sibling

You can access any time the parent element, the children elements or sibling elements by using these JQuery functions. For example:

$(element).parent() => return the parent element of the selected element.

$(element).children() => returns all direct children nodes of the element.

$(element).siblings() => returns all siblings elements of the element.

$(element).find('p') => returns all paragraphs that are descendants of the element.

Docs for accessing ancestors

Docs for accessing descendants

Docs for accessing siblings

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?