Twitter Bootstrap dropdown not working in any browser

后端 未结 4 1422
时光取名叫无心
时光取名叫无心 2021-01-19 16:11

I\'m trying to do a dropdown menu and it seems to work in Jsfiddle. It seems that the javascript and css files are correctly loaded: http://imgur.com/YYiJS4p

But it

相关标签:
4条回答
  • 2021-01-19 16:37

    This is what i'm loading:

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

    I tried your code, loading a bootrasp I have in my machine and a the jquery from the site. and it works perfectly in FF, chrome and safari. I don't have a explorer to test it.

    0 讨论(0)
  • 2021-01-19 16:40

    I was having a similar problem but found that i was loading both

    bootstrap.min.js

    and

    bootstrap.dropdown.js

    this was causing a conflict in my code, you dont need to load both as the dropdown code is included in bootstrap.min.js

    0 讨论(0)
  • 2021-01-19 16:52

    "min" versions cause problem some times (I face issues with .min files occasionally with ASP.NET MVC)

    I had same issue, tried with bootstrap.js and it works fine!

    Try same at your end.

    0 讨论(0)
  • 2021-01-19 16:52

    You need to load bootstrap.min.js or bootstrap.js before you load bootstrap-dropdown.js. Bootstrap dropdown is a js plugin with a dependancy on the Bootstrap framework.

    Your footer section would then look like this:

    <footer>
      <p>© Company 2013</p>
    </footer>
    <script src="./js/jquery-1.9.1.js"></script>
    <script src="./js/bootstrap.js"></script>
    <script src="./js/bootstrap-dropdown.js"></script>
    

    You can customize your build of Bootstrap, then you don't have to separately include the bootstrap-dropdown.js—it will be loaded with Bootstrap.

    Bootstrap custom download: http://twitter.github.com/bootstrap/customize.html

    0 讨论(0)
提交回复
热议问题