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
Adam Lawler
3,377 PointsTrouble with simple jquery
I'm stuck on the first challenge on the "intro to jquery"section. The task is to: "use jQuery to select all list items (li) in an unordered list (ul) with the class of 'nav'".
I've been trying for some time now, but can't figure it out.
Any tips would be greatly appreciated.
3 Answers
James Barnett
39,199 PointsThe key to this question is to understand that the <ul> element has a class of nav, in other words it's <ul class = "nav">.
So the HTML would look something like this:
<ul class="nav">
<li></li>
</ul>
Now ask youself ... what is the CSS selector I would use to select all <li>s from the above markup?
If you're not exactly sure how to do that, I'd recommend you check out the Become a Web Designer learning adventure.
While the courses can be taken in any sequence the, order they are listed in the learning adventures is strongly recommended.
Adam Lawler
3,377 PointsThanks James.
I was feeling as if I missed a step somewhere too, so I will for sure take your advice on the courses I missed. I thought I was following the path I was supposed to, but I guess I took a wrong turn.
Anyway, thanks again.
James Barnett
39,199 PointsAnytime Adam it's a common mistake for users new to Treehouse.
Please spread the word to your classmates about the Become a Web Designer learning adventure.