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) Introduction to jQuery Include jQuery in a Project

Don't understand how to link to JQuery CDN

The JQuery website doesn't match the one in the help video, there are so many links I don't know which code to copy paste from this page: https://code.jquery.com/

I got the google code I'm using in this exercise from another course but it's saying it's wrong. Thanks-

index.html
<!DOCTYPE html>
<html>
<head>
    <title>Take Evasive Action</title>
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
    <p class="warning">
      <span>It's A Trap!</span>
    </p>
    <div class="image">
        <img src="img/ackbar.gif">
    </div>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js'></script>
    <script src="js/app.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>

2 Answers

Aleksandrs K
Aleksandrs K
7,601 Points

Just click on one of the links that says 'minified'. There will be a popup with the code snippet. I think you can use any version.( 3.x, 2.x, 1.x). Worked fine with 2.x.

Chris Shaffer
Chris Shaffer
12,030 Points

I'm not sure it's a specified requirement (because I only looked at this challenge, not previous ones) but it probably wants you to use 2.2.4. This is really the standard. 1.12.4 is deprectated and 3.x is technically still in beta.

Like Aleksandrs said, click the minified link and copy/paste that <script> code.