Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript and the DOM Responding to User Interaction The Event Object

Michal Janek
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Michal Janek
Front End Web Development Techdegree Graduate 30,653 Points

Practice on "Bubbling" concept?

For some reason, I believe that this bubbling concept and especially all the list items getting event handlers not only the ones created at the beginning is incredibly important. Would love to solidify this knowledge. Any leads on practice ideas?

Not sure on practice specifically, but this Smashing Magazine article provides a detailed explanation of DOM events and the event cycle (bubbling is only one of the 3 phases of the event cycle).

2 Answers

Brendan Moran
Brendan Moran
13,756 Points

Also, there are CSS pseudo classes that can do some of this for us. E.g. changing colors or opacity on hover or click. The UPPERCASE text example in the video is good, because this can only be done with javaScript. While practicing this, make sure you aren't doing something that could be done much more easily with a CSS rule.

Brendan Moran
Brendan Moran
13,756 Points

Create a little mock page in jsfiddle or codepen and go to town!