$ is not defined in jquery error

JavaScript
This type of error arise when the jquery library file is not included properly in HTML file.
or if its included then might be the chances of file path error for that you need to cross verify the file path.

Here is the direct solution that you copy below path and paste in your HTML document.
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

/*
I hope it will help you.
Stay Home Stay Safe
Namaste
*/
Source

Also in JavaScript: