//uncaught referenceerror $ is not defined jquery
// copy and paste these code bellow html page .
<script src="jquery-3.6.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
jQuery must be loaded first before your script.
example:
<script src="path/to/jquery.js"></script> <!-- or using CDN is up to you -->
<script type="text/javascript">
// your script here...
</script>
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>