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 |
What is jquery mobile theming? : jquery mobile
What is queue() in jquery? Use of queue() in jquery?
Is jquery a framework?
Tell me how to use migrate jquery plugin if possible? : jquery mobile
What is the use of delegate() method in jquery?
How to disable jquery animation? : jquery mobile
Explain the difference between .empty() and .remove() ?
How to get the server response from an ajax request using jquery?
What is the difference between $.map and $.grep in jQuery?
Can you include multiple version of jQuery? If yes, then how they are executed?
What is $() in jquery library?
How can you get the type of arguments passed to a function?