2012-10-20 111 views
3

http://jsfiddle.net/Cwf4W/10/引導下拉不起作用

還有我的代碼,我似乎無法得到引導下拉菜單的工作,任何幫助嗎?我敢肯定,我已經得到了所有的JS權利和CSS也一樣,我一直在尋找一段時間了:○

<!-- BOOTSTRAP --> 
     <div class="navbar navbar-inverse" style="position: static;"> 
      <div class="navbar-inner"> 
      <div class="container"> 
       <a class="btn btn-navbar" data-toggle="collapse" data-target=".subnav-collapse"> 
       <span class="icon-bar"></span> 
       <span class="icon-bar"></span> 
       <span class="icon-bar"></span> 
       </a> 
       <a class="brand" href="#">Project Stalk</a> 
       <div class="nav-collapse subnav-collapse"> 
       <ul class="nav"> 
        <li class="active"><a href="#">Home</a></li> 
        <li><a href="#">About</a></li> 
        <li><a href="#">Contact</a></li> 
        <li class="dropdown"> 
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings <b class="caret"></b></a> 
        <ul class="dropdown-menu"> 
         <li><a href="#">Account settings</a></li> 
         <li><a href="#">Privacy settings</a></li> 
         <li><a href="#">Logout</a></li> 
         <li class="divider"></li> 
         <li class="nav-header">Nav header</li> 
         <li><a href="#">Separated link</a></li> 
         <li><a href="#">One more separated link</a></li> 
        </ul> 
        </li> 
       </ul> 
       <form class="navbar-search pull-left" action=""> 
        <input type="text" class="search-query span2" placeholder="Search"> 
       </form> 
       <ul class="nav pull-right"> 
        <li><a href="#">Link</a></li> 
        <li class="divider-vertical"></li> 
        <li class="dropdown"> 
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> 
        <ul class="dropdown-menu"> 
         <li><a href="#">Action</a></li> 
         <li><a href="#">Another action</a></li> 
         <li><a href="#">Something else here</a></li> 
         <li class="divider"></li> 
         <li><a href="#">Separated link</a></li> 
        </ul> 
        </li> 
       </ul> 
       </div><!-- /.nav-collapse --> 
      </div> 
      </div><!-- /navbar-inner --> 
     </div><!-- /navbar -->  

回答

1

你的代碼看起來正確的,但有幾個JavaScript文件包括http://www.sieuphan.com/bootstrap/bootstrap-dropdown.js返回一個錯誤 - 404

發展控制檯清楚地表明瞭這些錯誤(例如,在Chrome瀏覽器的「查看>開發人員> JavaScript控制檯」)

+1

哦,非常感謝您指出了這一點,我還挺noobie,所以我只是用記事本+ +我真的不知道太多的調試:)只是試驗周圍。 http://www.sieuphan.com/bootstrap/bootstrap-dropdown.js shoulda被http://www.sieuphan.com/bootstrap/js/bootstrap-dropdown.js 非常感謝你! – ZZPLKF

+0

@SieuPhan值得讓JavaScript控制檯保持打開狀態,即使只是爲了檢查錯誤消息! – dbr