+ 3

Why JS returns $ is not defined?

When I write jQuery code in js, starting with $(document).ready(function(){ }); the js returns that $ is not defined. How to solve thiss issue?

25th Jul 2017, 11:00 AM
Dragan Lazarevski
2 ответов
+ 10
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> add this in the head tag
25th Jul 2017, 11:04 AM
The Coding Sloth
The Coding Sloth - avatar
+ 6
yeah it will only work if you refer the jquery library's link in the head tag
25th Jul 2017, 11:39 AM
_Retr0/-
_Retr0/- - avatar