Monday, June 3, 2024
72
rated 0 times [  74] [ 2]  / answers: 1 / hits: 19808  / 12 Years ago, mon, december 17, 2012, 12:00:00

Got a Problem with my Bootstrap. It seems as if the JS is not working correctly somehow, because even the easiest examples of popovers dont work. (http://jsfiddle.net/weuWk/363/)
This little piece of code which works correctly on JSFiddle, is just creating a Button(w/o hover functionality) if used in my source code.



The Modal-Plugin is actually working, so this should mean that i include the js files in the right way. I will copy it anyway:



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

More From » twitter-bootstrap

 Answers
10

jQuery needs to be included before bootstrap's javascript, as bootstrap is just jQuery plugins.



You should Include in this order:




  1. jQuery

  2. Bootstrap

  3. Your Javascript



EDIT: Try this right before the closing body tag



<script src=http://code.jquery.com/jquery-latest.js></script>
<script src=js/bootstrap.min.js></script>
<script>
$(function(){
$('#test').popover();​
});
</script>


Also, the console is your friend. Check and make sure there are no errors.



SOLVED:



Solution: > Right order of Includes > fixing errors i got from my js console.


[#81371] Saturday, December 15, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
demondp

Total Points: 154
Total Questions: 97
Total Answers: 99

Location: Mali
Member since Thu, Jul 9, 2020
4 Years ago
;