Mark
Mark

Reputation: 544

Bootstrap 3 - jQuery is not defined Error?

I get this error when viewing my Bootstrap website with the FF Error Console

Error: ReferenceError: jQuery is not defined Source File: http://localhost/cap3boot/js/bootstrap.js Line: 6

All my JS files are linking to the correct directories.

Drop-down menus seem to work ok. Should I be concerned? Any ideas?

Upvotes: 1

Views: 10934

Answers (2)

Mark
Mark

Reputation: 544

I have fixed the problem. It was something really simple.

The two js files for HTML shim were not linked correctly, causing the error.

This is before

<script src="../assets/js/html5shiv.js"></script>
<script src="../assets/js/respond.min.js"></script>

After. Fixed.

<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>

Upvotes: 1

Jordan
Jordan

Reputation: 32522

You need to include the jQuery JS file before you include bootstrap.js. It can't be afterwards.

Upvotes: 9

Related Questions