Question

I have some problem with the JavaScript in bootstrap. It working fine for css,but when i use javascript like modal or tooltips, it won't show. I don't know what went wrong, i've downloaded all the source code from http://getbootstrap.com/ and put

//css bootstrap
<link href="bootstrap-3.1.1-dist/css/bootstrap.min.css" rel="stylesheet">

//js bootstrap
<script src="bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>

So, what should i add/configure more?

Was it helpful?

Solution

As Shredmil mentioned above, Bootstrap does require jQuery. Make sure it's included ABOVE bootstrap.min.js.

//css bootstrap
<link href="bootstrap-3.1.1-dist/css/bootstrap.min.css" rel="stylesheet">

//js bootstrap
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top