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
Pedro Pinto
3,798 PointsUsing jQuery to Select Elements - Task 2
In the code challenge "On the next line, use jQuery to select all list items (li) in an unordered list (ul) with the class of 'nav'?" I don't know which is the right answer.
I though the right answer was $("nav ul li a");
Thanks
5 Answers
Steve McKinney
29,274 Points$(".nav li"); or $("ul.nav li") should do the trick.
Pedro Pinto
3,798 Pointsthanks, now it works
Twiz T
12,588 PointsJust remember the rules are similar to that of css so when it asks you to select "with the class of 'nav' " you will be using the '.' to select the class.
James Home
12,011 PointsI just posted this a few days ago. I got a bit confused too.
Nir Benita
Courses Plus Student 3,905 PointsWhich challenge would that be? Could you please provide a link?