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 jQuery Basics (2014) Creating a Mobile Drop Down Menu Perform: Part 3

Teo Manetti
Teo Manetti
7,411 Points

Can someone explain me from where the other <li> items get the class .selected?

Correct me if I'm wrong but what I got from this lesson is that, only the <li> items with the class="selected" inside are going to be touched by the .prop("selected"), but the only <li> item that has this class inside is "Events". Probably I forgot about him using some method to bring that class inside other <li> items, can you enlighten me please!?

1 Answer

Bryan Peters
Bryan Peters
11,996 Points

Each html page has the <li class="selected"> as static code for the appropriate page. So if you go to the faqs.html page you notice that the <li class="selected"> next to FAQs And if you go to the about.html page you notice that the <li class="selected"> next to About

changed from comment to answer

Teo Manetti
Teo Manetti
7,411 Points

Oh God! How could I have been so blind! Thank you so much Bryan Peter