Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.