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!

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 JavaScript and the DOM (Retiring) Making Changes to the DOM Changing Element Attributes

What was the goal of this video?

I did not understood what was dave trying to imply in this video

Joshua Baatz
Joshua Baatz
8,532 Points

I find myself asking this question more and more these days. The problem is that it's not Dave doing the video. It's Guil. Guil is a knowledgable dude who knows what he's talking about, but he's not so good at letting us know why we should care about what he's saying.

Dave always gave real world examples for his lessons. "Let's say I was running a hot dog stand and I wanted to <whatever>". Guil just says "here's something you can do" and then moves on to ten other things you can do. It doesn't feel like it's building on anything you've previously learned. As such, it doesn't feel like you are moving toward something. Just feels like you are reading a dictionary cover to cover.

4 Answers

Steven Parker
Steven Parker
225,664 Points

I think the point was to show you how you can change or add attributes to HTML elements. The example code created a tooltip by adding a "title" attribute.

Basically, it teaches you to set properties to your elements from the javascript console. in other words, you can take some HTML tag and modify once this HTML file is rendered with 'inspectors elements' of Chrome browser. After it shows you the same, but straight on your Javascript files.

henry duquesnay
henry duquesnay
6,976 Points

i also dont think i understand where the video is going, and dont feel i learned anything.

There is a setAttribute and getAttribute i never heard mentioned once except as a byline in teachers notes.

I would consider scrapping this video.

Taylor Council
Taylor Council
4,101 Points

I am also a little confused about the real world use case for these tags. Maybe this would be improved by uploading some recent resources to supplement this section.