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


Error loading JQuery

I have loaded up the program files in Sublime text and am having the following problem:

<!DOCTYPE html>
    <title>Take Evasive Action</title>
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
  <p class="warning">
    <span>It's A Trap!</span>
  <div class="image">
    <img src="img/ackbar.gif" />
    <script src="http://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/app.js" type="text/javascript" charset="utf-8"></script>
//Hide Warning
//Show Warning Slowly

The javascript console in Chrome is giving me the following error, "Uncaught ReferenceError: JQuery is not defined app.js:2 (anonymous function)"

If I comment out the JQuery(".warning").hide(); statement and uncomment the last statement, it works fine. I accessed the package control in Sublime and installed the JQuery package, restarted Sublime and still get the same reference error.

I know I can just replace JQuery with $, but my understanding is that its better to use JQuery because $ could be aliased to something in another JS library and create conflicts. I'd prefer to sort this issue out, if there is a way. Any help is much appreciated!

1 Answer

Your reference error may be related to the fact that you are capitalizing the J.


Have you tried it with:


You are a scholar and a gentleman sir. Thank you!