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

Intro to Jquery

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

my answer:

$("#container");
$("nav a");

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

4 Answers

You are selecting a different element type than what is being requested. a != li

Furthermore, I realize it doesn't specifically state in the video, but to break it down you need to add the 'ul', then attach the class 'nav' using dot-notation and finally add the 'li'.

You should probably do the Become a Web Designer learning adventure. It takes you thourgh what all the selectors mean and much more!

You need to select all of the ul tags that have the class of .nav and all of the li tags within them.

What you did was select all the nav tags, (which as far as I know dose not exist), and all of the a tags in them.

Dose that make sense?

Do you mean in this example? The nav element surely does exist - Using the HTML5 Nav Element.

Thanks Sean T. Unwin! I have just learned something new.:blush:

Yes i think so, thanks.

Yep.