Uncaught ReferenceError: jQuery is not defined at code example
Example 1: jquery $ is not defined
<!--If that error occurs, you need to include Jquery in the HTML-->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
Example 2: Uncaught ReferenceError: $ is not defined
You should put the references to the jquery scripts first.
<script src="jquery-3.5.1.js"></script>
<script type="text/javascript" src="script.js"></script>