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
Kevin Faust
15,353 PointsReference error: $ is not defined on line 1
Hello everyone,
For some reason, when I load my site and check the console, this error keeps appearing supposedly on line 1. I made sure i linked to jquery and i also checked my code over and over and everything looks fine. I tried putting the jquery script tag before my js tag but that didnt work either.
Basically what I want to happen is that when I click the home button, the menu which is currently offscreen is to slide into view. and then when I click the picture on the menu bar, the menu bar is to slide back out of view. I believe that my code is correct but im not completely certain.
Any help would be appreciated. Cheers
My screenshot: https://w.trhou.se/re47q2g8xd
Kevin Faust
15,353 PointsI tried that already but still doesn't work.
3 Answers
Austin Buddington
20,119 Pointscheck out the 2 script tags at the bottom of index.html
Austin Buddington
20,119 PointsPlease this workplace snapshot: https://w.trhou.se/6d29fur1t6 I accidentally forgot to save, It looks like you need to include the jquery script tag before your script tag and add http to it, I was able to load up your code with no console warnings, and your nav animation works.
Austin Buddington
20,119 PointsPlease this workplace snapshot: https://w.trhou.se/6d29fur1t6 I accidentally forgot to save, It looks like you need to include the jquery script tag before your script tag and add http to it, I was able to load up your code with no console warnings, and your nav animation works.
Kevin Faust
15,353 PointsHey Austin,
Yours, even without the http, still worked. I copied your exact script tag into mine but it wasnt working yet when i went on different browsers they all worked. So i deleted my chome cookies/cache/etc. and now its all working finally!! Thanks for the help
Austin Buddington
20,119 PointsTry adding: http:
to the beginning of your jquery script tag, some browsers don't like it when you leave out the network protocol (http)
Kevin Faust
15,353 PointsStill doesnt work :/
Austin Buddington
20,119 PointsMy bad, I forgot to save that one,
try this one: https://w.trhou.se/6d29fur1t6
Austin Buddington
20,119 PointsAustin Buddington
20,119 PointsMake sure to include your Jquery script tag before your custom JS.