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

Joanna Demecka
Joanna Demecka
16,883 Points

Google CDN hosted jQuery doesn't pass task one of section 1 in jQuery basics

Hi, why my code doesn't pass in task 1 of introduction to jQuery in jQuery Basics. My code is:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>

<!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="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
    <script src="js/app.js" type="text/javascript" charset="utf-8"></script>

2 Answers

Hendrik /
Hendrik /
13,961 Points

Hi you need to use the CDN from the official jQuery page: jquery code and paste it before the app.js script in the body :)

Joanna Demecka
Joanna Demecka
16,883 Points

Well, that was embarrassing :P Tank you Hendrik :D