main.js:1 Uncaught ReferenceError: $ is not defined code example
Example 1: Uncaught ReferenceError: $ is not defined
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="path-para-seu-script"></script>
Example 2: reference error $ is not defined jquery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Example 3: register:48 Uncaught ReferenceError: $ is not defined
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Example 4: 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>