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 jQuery Basics (2014) Creating a Spoiler Revealer Perform: Part 3

Adam Kempin
Adam Kempin
9,586 Points

Why is it that jQuery and Javascript never seem to work when I use preview workspace?

Both Chrome and Firefox seem to be non-responsive when I preview workspace, this has happened in all modules so far when using JS and now jQuery. For example, in this lesson, clicking the preview just shows "Darth Vader is Luke Skywalker's Father! Noooooooooooo!", and no button or anything is loaded at all.

Henrique Machuca
Henrique Machuca
5,611 Points

Can you paste your HTML and java code please?

3 Answers

Do you have javascript enabled in your browsers?

Check popup blockers, things like noscript, and your code. Treehouse seems to briefly reload the page as it switches to preview. If software on your computer is blocking this reload or the script itself that could cause your issue. Also, if you have an error in your code it may not work either.

Erik Cruz
Erik Cruz
9,772 Points

If you are not running a local server it may be problematic to load outside sources, such as jQuery from a CDN. If and when that happens download a copy of the file and place into your js/ directory. Give that a shot.