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 trialJon Feldman
5,339 PointsWhen I load the page, only half of the button is visible. Similarly, when the button does not hide, it only moves down.
Here is my code //hide the span $(".spoiler span").hide();
//add a button $(".spoiler").append("<button>Reveal Spoiler<button>");
//when button is pressed $("button").click(function(){ //hide the button $(this).hide;
//show the span $(".spoiler span").show(); });
Aaron Wise
7,517 PointsAaron Wise
7,517 PointsOn line 3 it looks like you're missing the parentheses on your 'hide'
needs to be:
$("button").click(function(){ //hide the button $(this).hide();
Other than that I can't see anything else that would be syntactically wrong.