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

HTML Build an Interactive Website Introduction to jQuery Using jQuery to Select Elements

Is Code Challenge Incorrect?

Seems like a very easy code challenge but???

On the next line, use jQuery to select all list items (li) in an unordered list (ul) with the class of 'nav'?

$("#container"); $(".nav ul li");

but when I check my answer i get the following result

Bummer! Enter the string of the CSS selector for all li elements in a ul element with the class of 'nav'

6 Answers

This caught me out to. You basically need to select the ul with the class of .nav and then the listed items within that class.

$('ul.nav li')

Just a case of getting it in the right order.

Claire

Thanks for the information, thats about the only order I didn't try! Also another quick question how do you copy the screen from the challenge to the forum post like you did in your message?

Thanks for the information, thats about the only order I didn't try! Also another quick question how do you copy the screen from the challenge to the forum post like you did in your message?

Glad I could help. If you mean how to put code into a forum post you basically want to put 3 backticks on the line before the start of your code and on the line after the code. (''') Check out the "markdown cheetsheet" that's linked under the box you comment in on the forum. Hope that helps and makes sense :)

Alan Bothe
Alan Bothe
14,352 Points

Same here Steve. I tried everything EXCEPT this. I'm pretty sure that's not the normal CSS syntax and the video didn't cover it.

Alan

I agree it doesn't look like normal CSS to me either