$ is not defined | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

$ is not defined

this is probably really simple but it just doesn't seem to work for me. I can't seem to figure out how to make a button work like it should. It keeps on showing the "$ is not defined" message and I've tried almost everything¿? elp

29th Jun 2017, 10:40 PM
Lee
Lee - avatar
4 Answers
+ 9
make sure to include jQuery library before your code
29th Jun 2017, 10:59 PM
Thanh Le
Thanh Le - avatar
+ 2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> try to use in the <head>
30th Jun 2017, 9:46 AM
Андрей Факащук
Андрей Факащук - avatar
+ 1
can u share the code
29th Jun 2017, 10:55 PM
Peshkawt Mahmood
Peshkawt Mahmood - avatar
+ 1
I think you should include the jQuery script in the HTML page where you have placed the button. It's commonly included inside the <head> as <script type="text/javascript" src="jquery.min.js">
29th Jun 2017, 10:57 PM
Felipe BF