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 trialTyler Dix
14,230 PointsDo we just add the click function, or add all the code we wrote like the previous challenges?
I'm stuck on this one. Are we just adding the .click(function() or adding all the code we wrote, like the previous code challenges?
Here's what I tried to submit:
$("button").click(function(){ // 3.1. Show spoiler $(".spoiler span").show(); // 3.2. Get rid of the button });
1 Answer
Julian Gutierrez
19,201 PointsYes, you just need the click function. The solution you provided is correct you just need to get rid of those comments inside of the anonymous function. The second comment is commenting out the necessary closing curly bracket, parenthesis, and semicolon.