Arqetech
Arqetech

Reputation: 483

Bootstrap Javascript not working on live website

I've been facing some problems in my website. I have a lot of js files in my web server, but the bootstrap.js file does not work. Here is the link to the ressource and it also blocks AddThis sharing tools. I have no Idea how this is happening!

here are the main js which I'm using:

<script src="http://arqetech.net/js/index.js"></script>
<script src="http://arqetech.net/js/bootstrap.js"></script>
<script src="http://arqetech.net/js/secondary.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>

And here is the website link

Thanks for your time!

Upvotes: 0

Views: 1102

Answers (3)

sabriele
sabriele

Reputation: 656

In addition to jQuery being a pre-requisite for Bootstrap's Javascript to work (as mentioned in the previous answers), it is also worth noting that as of v 3.3.6,

"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3"

(just in case you thought using the latest version of jQuery would be better, as I did.)

Upvotes: 0

Elvin
Elvin

Reputation: 1

You must load jquery before bootstrap because bootstrap use jquery. If any custom script use jquery too....jquery must be loaded before that custom script.

I recommend you that use minified version of all js files because it increase your web site performance

https://developer.yahoo.com/blogs/ydn/high-performance-sites-rule-10-minify-javascript-7208.html

Upvotes: 0

AndrewL64
AndrewL64

Reputation: 16311

You need to load the jQuery script first followed by the Bootstrap js and finally the custom scripts last like this:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>‌​
<script src="http://arqetech.net/js/bootstrap.js"></script>
<script src="http://arqetech.net/js/index.js"></script>
<script src="http://arqetech.net/js/secondary.js"></script>

Either use this:

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

Or this:

<script src="http://code.jquery.com/jquery-latest.js"></script>

BUT NOT BOTH

Upvotes: 4

Related Questions