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 trialPongpon Tienthong
7,815 PointsMy browser loaded all the html code before jQuery hided the spoiler. So, the message was revealed. What should I do?
My browser loaded all the html code before jQuery hided the spoiler. So, the message was revealed. What should I do?
1 Answer
Marcus Parsons
15,719 PointsHey Pongpon,
An easy fix to this is to simply hide the spans within the spoiler (aka the spoilers themselves) in the CSS. That way, they will only show up once the button has been clicked. Here is my selector in the CSS stylesheet:
.spoiler span {
display: none;
color: #dae1e4;
}
Pongpon Tienthong
7,815 PointsPongpon Tienthong
7,815 PointsThank you!!!
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsYou're welcome! I got 10 emails this morning saying this answer was upvoted lol