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 jQuery Basics Working with jQuery Collections Working with jQuery-Specific Selectors

Not sure what I'm doing wrong

What am I doing wrong, what steps

index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
    <h2>Star Trek Characters</h2>

    <ul class="character-list">
        <li>Captain Jean Luc Picard</li>
        <li>Data</li>
        <li>Worf</li>
        <li>Dr. Crusher</li>
    </ul>

    <div>I am supposed to stay hidden!</div>    

    <script
    src="jquery-3.2.1.min.js"></script>
    <script src="app.js"></script>
</body>
</html>
app.js
const $show = $(div, li:hidden);
$show.show();

2 Answers

Fran ADP
Fran ADP
6,304 Points

reveal just the hidden the div.

Steven Parker
Steven Parker
231,269 Points

No, not the div. Just the list items. The instructions say "... while leaving the <div> element hidden". :see_no_evil:

Steven Parker
Steven Parker
231,269 Points

you're on the right track, but I see 3 issues:

  • the instructions say to reveal just the hidden li's, not the div
  • the selector must be enclosed in quotes
  • use method chaining to avoid creating a variiable