Twitter Bootstrap drop down menu not working

后端 未结 8 1775
遇见更好的自我
遇见更好的自我 2021-02-08 03:33

I know there are a lot of questions like this on Stack Overflow and I\'ve looked at them but my dropdown menu still isn\'t working.

Here\'s my code:



        
相关标签:
8条回答
  • 2021-02-08 04:22

    For mine it was because of the order of adding scripts was not right , it should be like this :

    <script src="Scripts/jquery-1.9.1.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
    
    0 讨论(0)
  • 2021-02-08 04:24

    Seems to work fine in jsFiddle, here is an example http://jsfiddle.net/2hGuv/

    You must remember to import the js file. here is the code with the following files imported: http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js

    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <ul class="nav pull-left">
                    <li><a href="#myModal" class="dropdown-toggle" data-toggle="modal" data-keyboard="false" data-backdrop="static">Login</a>
    
                    </li>
                    <li class="dropdown" id="accountmenu"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">My Account<b class="caret"></b></a>
    
                        <ul class="dropdown-menu">
                            <li><a href="#">Login</a>
    
                            </li>
                            <li><a href="#">Register</a>
    
                            </li>
                        </ul>
                    </li>
            </div>
        </div>
    </div>
    
    0 讨论(0)
提交回复
热议问题