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

JavaScript

Alexandra Velez
seal-mask
.a{fill-rule:evenodd;}techdegree
Alexandra Velez
Front End Web Development Techdegree Student 9,313 Points

Buttons in jQuery Exercise Aren't Covering Spoilers

https://w.trhou.se/x5vy0wni6y

I've checked the code a few times, and I don't see where the code error is.

At the moment, there's an issue where the spoilers are revealed instantly when the page loads. The buttons are not covering the spoilers.

Why aren't the buttons covering the spoilers?

1 Answer

Hi Alexandra - issue seems to be with the quote marks in your code. Here's your code:

// Hide the spoiler text on page load
$(β€˜.spoiler span’).hide();

I changed it to this and it worked:

$('.spoiler span').hide();