this question has answer here:
- jquery - $ not defined 34 answers
<!doctype html> <html lang="en"> </html> <head> <meta charset="utf-8"> </head> <body> <button>click me!</button> <p>k o n t s</p> <script src="k.js" type="text/javascript"></script> <script src="jquery.js" type="text/javascript"></script> <script src="jquery2.js" type="text/javascript"></script> </body> </html>
while js :
$(document).ready(function(){ $("button").click(function(){ $("p").fadeout(); }); });
this happened morning.
the k o n t s won't fade out when click button. knows why ?
*i've made code simple, still dont fault(s). *and stuff have been placed in same folder.
looks js files not referenced properly.
$(document).ready(function(){ $("button").click(function(){ $("p").fadeout(); }); });
<!doctype html> <html lang="en"> </html> <head> <meta charset="utf-8"> </head> <body> <button>click me!</button> <p>k o n t s</p> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> </body> </html>