X10nD
X10nD

Reputation: 22050

Uncaught Reference Error: $ is not defined for .js, even with code looking all good

I searched on stackoverflow and how I have placed my links and the .js is all fine

PHP file

<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="save.js"></script>

save.js

$(document).ready(function() {

});

The places all are correct but I do not seem to understand why I am getting the error for save.js:

Uncaught ReferenceError: $ is not defined

Any ideas how to resolve this error?

Upvotes: 1

Views: 91

Answers (1)

Zakaria Acharki
Zakaria Acharki

Reputation: 67525

It's clear that your jQuery library isn't loaded properly, include it from "googleapis" via secured HTTP like:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Upvotes: 4

Related Questions