I am very new to web development and Javascript in general and I hae done some Jquery coding by adding my code in my HTMl code all the time. Now, I just moved the same code to my .Js file and my console shows me following error:
$ is not defined [Break On This Error] $(document).ready(function () {
It just says JQuery is not defined. It means that I can not refer to Jquery or any other Javascript files in my Js file?
Or there is something that I am missing here?
Just include jQuery before your script is called
For other jQuery stuff available in CDN, see this:
http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
Update: This is as close to “using” as you can get, in my mind. It’s not required to download the jQuery library to your system or host it on your server.