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.holdready() function?
Why use jQuery filter() Methods?
How do you disable or enable a form element?
Does jQuery 2.0 supports IE?
Tell me does jquery 2.0 supports ie? : jquery mobile
How do you attach a event to element which should be executed only once?
How JavaScript and jQuery are different?
Define the script build up by jquery?
differentiate between bind() vs live() vs delegate() methods in jquery.
What are the advantage of using minimized version of jquery?
How to executed jquery selectors? : jquery mobile
How do I check if an HTML element is empty using jQuery?