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 trialmargarethepadysz
Courses Plus Student 3,792 PointsResult right, error message when checked
Hi, the "check work" results says that my variable declaration is wrong. However, I get the right result and the hidden elements are shown. What is wrong? Thank you for help!
const $hiddenElement = $(':hidden'); $hiddenElement.show();
3 Answers
Antti Lylander
9,686 Pointstwo problems:
- the validation does not like declaring a variable. Don't declare any variable.
- select only the list items that are hidden
Adam Beer
11,314 PointsChallenge Task 1 of 1
There are three hidden items on this page-- a div and two list items. Use jQuery's :hidden pseudo selector to select only the hidden list items. Then use the show() method to expose the hidden elements.
So the first step, select the hidden list items. Second step, write this in a row and use "show()" method. You are so close, but you haven't selected the list items.
margarethepadysz
Courses Plus Student 3,792 PointsNow I got the following and it worked out:
$('li:hidden').show();
Thanks everyone!