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
layeesolo
7,316 PointsQuery is not working offline
I am trying to use Jquery while outside without wifi. I downloaded jquery the uncompressed, development jQuery 1.11.2 , but is not working offline. I am not sure if I can use it offline or I need internet connection. Each time I run the code in the browser, I get this error code ReferenceError: $ is not defined. When I try using Google Cdn, my code worked well. Thank you
layeesolo
7,316 Points$(document).ready(function(){
alert("Hello world!");
});
2 Answers
Ali M Malik
33,293 PointsYou must include jquery before your javascript file so that it has everything defined and loaded for you to use.
Hope this helps
layeesolo
7,316 Pointsoh, thank you very much I didn't know that.
layeesolo
7,316 Pointslayeesolo
7,316 Points