Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Jamie Harper
Jamie Harper
1,734 Points

Surely this is a poorly worded question....


Which question are you referring too?

I have just looked at both questions and the objective of each seems very clear to me. Perhaps I can clarify it for you.

2 Answers

I assume you're referring to the second question. If so, I'd have to agree.

From what I gathered, I believed the question wanted this:

$('ul li.nav');

What they really want is: within an unordered list with the class "nav", select all the list items.

If your are indeed referring to question 2 "On the next line, use jQuery to select all list items (li) in an unordered list (ul) with the class of 'nav'?"

First an unordered list with a class of nav, and every list item with it.

    $("ul.nav li") 

Perhaps it's the selector you are confused with Ricardo Hill-Henry you selected an li with the class of nav inside a ul

I understood it before I posted. That's why I added the sentence rephrasing the question for the OP. I just didn't want to give away the answer.

Fair one! I didn't read your last line. Haha my bad! :)