Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

What "Manipulating the DOM" mean?

Hello, In the Jquary course, the instructor keep using the terms, "Manipulating the DOM". Can somebody please explain to me what Manipulating the DOM means?

2 Answers

Steven Parker
Steven Parker
243,266 Points

In basic terms it just means "changing stuff on the page", since the "DOM" (Document Object Model) refers to how elements are arranged that represent what is displayed on the page.

I see, How about "Traversing through the Dom". What does that mean?

Steven Parker
Steven Parker
243,266 Points

Essentialy "moving around in the page structure". Or more specifically "moving from element to element within the page". You'll be using one element to find another (or others).

But why would I ever want to move around in the page structure? What benefit do I get by doing that? Also, when and why would I want to use one element to find another? Why would I even want to find an element? Can I please have an examples.