Javascript Uncaught ReferenceError: $ is not defined? 1


This error may occur if you are missing the Jquery plugin from your code. So, always add your JavaScript or jQuery code before calling the jQuery plugin. To solve this problem add the following jquery plugin in your header file  :

Google:

 

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Microsoft :

 

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>

You can add a custom jquery plugin as well. It will look like this :
 

 

<script src="js/custom.js" type="text/javascript"></script>

After adding the Javascript plugin refresh the browser.

If an error still exists then check HTTP & HTTPS of your website. If your website has HTTP connection, then use 

 

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

else, it will throw the same error. For HTTPS secure connection, Jquery plugin should have HTTPS so for secure https connection use the following plugin:

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>