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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Christoph Walpert](https://secure.gravatar.com/avatar/4d23daaee66b61014ce32cb9f7a61061?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Christoph Walpert
3,752 PointsHi my code doesn't give the desired outcome. Please review!
// Prevent spoilerphobs from seeing spoilers // Solution: Hide spoilers and reveal them through user interaction
// 1. Hide spoiler $(".spoiler span").hide(); // 2. Add a button $(".spoiler").append("<button>Reveal Spoiler!</button>"); // 3. When Button presser §("button").click(function(){ $(".spoiler span").show(); $(this).remove(); }); //3.1 show spoiler //3.2 get rid of button
2 Answers
![Sue Johnson](https://uploads.teamtreehouse.com/production/profile-photos/6668772/micro_sueello.jpg)
Sue Johnson
16,648 PointsYou have got a typo in your code, replace §("button")
with $("button")
. Also check out the Markdown Cheatsheet on how to format your code to make it easier to read in questions.
![Zachary Billingsley](https://secure.gravatar.com/avatar/03c7e76afddb1210b94052ab5666e208?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Zachary Billingsley
6,187 PointsHello!
Without knowing too much about the problem or the error you are facing I can see that you are trying select the button, but it has no identifier to reference it. So if you want to look for ALL buttons use the " : ".
https://api.jquery.com/button-selector/
Hope that helps!