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

Liam Mitchell-Dolby
5,666 PointsJQuery selecting CSS
On the first challenge task I don't know what I'm doing wrong. To select the list items in the unordered list in the nav class I typed $(".nav ul li"); but it doesn't work. What am I missing?
10 Answers

Scott Evans
4,236 PointsThat's really strange my code is exactly the same, have you tried reloading the challenge and restarting it. Try retyping the code aswell

Scott Evans
4,236 PointsHi Liam,
That is strange, there isn't a reason why that shouldn't work., could you tell me what error the Treehouse code editor is giving you when you try and check the work?
Thanks, Scott.

Liam Mitchell-Dolby
5,666 PointsIt says: Bummer! Enter the string of the CSS selector for all li elements in a ul element with the class of 'nav'

Scott Evans
4,236 PointsThat is very strange o_O. Could i see your code also?

Liam Mitchell-Dolby
5,666 PointsNo problem, how you I share the code with you? Not done it before!

Scott Evans
4,236 PointsJust post it in this discussion

Liam Mitchell-Dolby
5,666 Points$("#container"); $(".nav ul li");

Liam Mitchell-Dolby
5,666 PointsThose are on separate lines by the way.

Liam Mitchell-Dolby
5,666 PointsYeah tried refreshing and even logging out and back in again. I'm really confused.

David Rynn
10,554 PointsSomeone else answered this...
$(ul.nav li)
It's selecting all the 'li' within the <ul class='nav> so that's why the syntax is different, as opposed to <div class='nav'> <ul> <li> </li> </ul> </div> which would be your (and my) earlier attempt of $(.nav ul li)