You get "jquery is not defined" or "$ is not defined" error. What could be the reason?
Answer / chaitanya
There could be many reasons for this.
You have forgot to include the reference of jQuery library and trying to access jQuery.
You have include the reference of the jQuery file, but it is after your jQuery code.
The order of the scripts is not correct. For example, if you are using any jQuery plugin and you have placed the reference of the plugin js before the jQuery library then you will face this error.
Find out more here.
| Is This Answer Correct ? | 1 Yes | 0 No |
How to always reference latest version of jquery?
Can we add more than one ‘document.ready’ function in a page?
How can you add a jquery library in your project?
How we can remove an attribute of an html tag in jquery?
What are the differences between size and length in jquery?
What is jquery datepicker in jquery?
what does $("div") will select? : jquery mobile
Can we select a element having a specific class in jquery ?
What is the purpose of jquery?
Explain .delegate()? : jquery mobile
How do you get the attribute of an html tag in jquery?
What is the difference between onload() and document.ready() function used in jquery?