I wanna use some jQuery to make a sticky nav bar but I get the errors
ERROR: ‘$’ is not defined. [no-undef].
ERROR: ‘document ’ is not defined. [no-undef]
and the code doesn’t work. Can anybody help me why I get these errors and how to solve it?
I wanna use some jQuery to make a sticky nav bar but I get the errors
ERROR: ‘$’ is not defined. [no-undef].
ERROR: ‘document ’ is not defined. [no-undef]
and the code doesn’t work. Can anybody help me why I get these errors and how to solve it?
I think your Jquery library is not loaded in Page otherwise your script loaded before Jquery.
So, Insert Jquery Library and your custom script like below.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="custom.js"></script>
1st one: Your jquery file is not being properly loaded into your page
2nd: You have a botched version of jQuery. This could happen because someone edited the core file, or a plugin may have overwritten the $ variable.