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 trialjenp
12,473 PointsNot sure how the tabbed menu works
Before we even get into the jQuery part of this, I'm not sure how the existing tabbed menu works.
The class "selected" seems to move to a different list element when you click on the corresponding tab. But how does the class move? I've looked through the CSS, and I don't see what's triggering that.
If anyone can explain, I would be grateful.
jenp
12,473 PointsThanks rick harrison... I thought it was somehow changing dynamically, but it is not.
2 Answers
Zak Posner
8,473 PointsEach tab within the project represents a different page of the website. The selected tag is used to identify which page in the navigation the user is currently visiting,. So on the back end, we use the selected tag on each page - attaching it to the link in the navigation which matches the current page.
When you are on the About page, the site loads the html code from about.html, which happens to have the selected tag placed in the about link of the unordered list of that page.
Karolin Rafalski
11,368 PointsI think what you are seeing is some functionality in html.
HTML has a select tag that then has options inside:
rick harrison
Courses Plus Student 41 Pointsrick harrison
Courses Plus Student 41 PointsHey jenp actually when you click on about tab the about.html page display where <li> with about name have class selected