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 trialTina Davidson
4,441 PointsRe: jQuery Basics (Perform: Part 1) My Spoiler is not hiding, code looks correct, could it be my browser?
Maybe I missed something....help! This is the code
//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!</button>");
//3.When button is pressed
//3.1 We want to show the spoiler
//3.2 Get rid of button
Jacob Mishkin
23,118 PointsI edited your post, so we could read your code better.
3 Answers
Tina Davidson
4,441 Pointshi there.... sorry I didn't have all the code including the html and css... for you to answer the question properly. I have figured out the problem, it was my browser, it just needed to be refreshed. It was not the code, it was indeed correct.
Maurice Tafolla- Cunningham
7,708 PointsI had a similar problem where my code was not working, but I figured it out.
The script's src in the workspace is outdated. The current version as of this post is as follows:
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
I was having trouble and I saw a lot of blame placed on the type of browser that was being used, but the code was just old. Might want to consider updating the code in the workspace.
johndupper
12,558 PointsMaurice -- thank you so much for posting this! I was getting so frustrated with nothing working in this course so far. I, like many others, thought "it must be my browser" because I didn't know what else to blame... Thank you for posting this solution - it changed my attitude completely about this series. :) Keep coding!
john wayne
Courses Plus Student 1,679 PointsI tryed the answer above, it still doesnt work :( even with the newer version of jQuery! I dont know what to do! The code is right, but nothing works
Jacob Mishkin
23,118 PointsIf you haven't already, please create a new post for your issue in the forum. that way more people can help you. Remember to add your code too! Hope your issue is solved already.
Liam Maclachlan
22,805 PointsLiam Maclachlan
22,805 PointsHi there.
Could you put up all of your code (HTML and jQuery)? Have a look at the Markdown Cheatsheet below when you add a new comment to help display it correctly :)
e.g.
<p>This is some HTML</p>