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 trialdevver
7,420 PointsPage not removing button?? check my code
this is my code below. every time i test it out the button stays and nothing happens? i dont know if its a bad connection or my code is wrong?? frying my head!
//prevent spoilerphobes 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 Now!</button>"); // 3 - when button pressed $(".button").click(function(){ // 3 - show spoiler $(".spoiler span").show(); // 4 - get rid of button $("this").remove(); });
eric nzenga
2,661 PointsAlso I believe it should be $(this).remove(); and not $("this").remove(); - no double quotes
devver
7,420 Pointsdevver
7,420 PointsCancel last
My bad