Luke
Luke

Reputation: 205

1uncaught reference error: $ is not defined

Why do I get this error on 2 of my externally called JavaScript files?

I tried the code inside my index.html file and it ran perfectly.

I've called all my scripts before stylesheets.

There are 4 scripts running on this page, all JavaScript, 2 of them work but 2 of them don't.

Upvotes: 0

Views: 2712

Answers (2)

Yasin Bahtiyar
Yasin Bahtiyar

Reputation: 2367

Try putting jQuery script tag on top of the other script tags.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>

Upvotes: 4

Kokos
Kokos

Reputation: 9121

You will receive this error if you are trying to use jQuery without having included the library.

Did you forget to include the jQuery library? Or maybe your url to the .js file is incorrect.

Upvotes: 3

Related Questions