You get "jquery is not defined" or "$ is not defined" error. What could be the reason?



You get "jquery is not defined" or "$ is not defined" error. What could be the r..

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

Post New Answer

More jQuery Interview Questions

Tell me how to select combobox select value and text using jquery?

0 Answers  


How do you attach a event to element which should be executed only once?

1 Answers  


Explain the difference between event.preventdefault and "return false"? : jquery mobile

0 Answers  


How to load jQuery locally when CDN fails?

1 Answers  


Explain cache paremeter of jquery ajax method?

0 Answers  






What is jquery mobile theming? : jquery mobile

0 Answers  


Difference between prop() and attr()? : jQuery Mobile

0 Answers  


What are the different type of selectors in jquery?

0 Answers  


How can you get the type of arguments passed to a function?

0 Answers  


Describe the two types of cdns?

0 Answers  


What are the advantage of using cdn? : jquery mobile

0 Answers  


Write a code for the implementation of a module pattern.

0 Answers  


Categories