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

Rodrigo Meraz
Rodrigo Meraz
8,567 Points

I did the same in Sublime Text but it doesn't happen anything. I even downloaded the files but still anything. Advice?

I copied the code from the video in my external workspace (Sublime Text 3) and did exactly as instructed in the video but it didn't work. I even tried downloading the compressed files and min files but it didn't help. How should I download the files? How can I use jQuery CDN when using Sublime Text to work in my projects?

David Sheridan
David Sheridan
8,579 Points

Can you attach your code to see what might be going wrong

Rodrigo Meraz
Rodrigo Meraz
8,567 Points

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

This is the js: function myCode() { $(".warning").hide().show("slow"); }

$(document).ready(myCode);

1 Answer

MarQwann Brown
MarQwann Brown
6,598 Points

I looked at your code and It's definitely attached correctly and runs on my machine. I would make sure that you're saving before you try to preview your code in your web browser. If that doesn't solve the issue I would recommend clearing your browsers cache. Both of those have worked for me in the past.

Rodrigo Meraz
Rodrigo Meraz
8,567 Points

Thank you. I've already fixed it but thanks for the advise, it will help in the future.