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 trialShaun Parker
14,153 PointsI've entered the code as it is in the tutorial but it still isn't working. Why have I missed out?
I've entered everything i've been told but I can't seem to get the button to appear. Is there something i'm missing out?
This is my code:
//problem: prevent spoiler being seen //solution: hide spoilers and realvel through user interaction
//1, hide spoiler $(".spoiler span".hide(); //2, add button $(".spoiler").append("<button>Reveal Spoiler!</button>"); //3, when button pressed //3.1, show spoiler //3.2, get rid of button
2 Answers
Maja B.
12,984 PointsThere is one end bracket missing: after $(".spoiler span"
$(".spoiler span").hide();
$(".spoiler").append("Reveal Spoiler!");
Shaun Parker
14,153 PointsThanks Maja... silly error.