2014-10-30 136 views
0

所以這是我第三次從我的repo中抹去一切乾淨,並從頭開始,因爲這個問題..我不熟悉js或jquery,所以很多這樣已經過了我的腦海,只希望能夠發揮它的作用。我從bootstrap複製了主題,並且它在第一時間工作正常。我添加了「reportcard.js」功能,並且nav-collapse菜單停止工作。Navbar崩潰不工作 - Bootstrap + Github

這裏是我的github阿迪 - https://github.com/twotimes22/twotimes22.github.io 網站是活在www.thomasweld.com

這裏是我的代碼了通過導航

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <meta name="description" content=""> 
    <meta name="author" content=""> 
    <link rel="icon" href="../../favicon.ico"> 

    <title>Thomas Weld | Developer + Marketer</title> 

    <!-- Bootstrap core CSS --> 
    <link href="/css/bootstrap.min.css" rel="stylesheet"> 
    <!-- Bootstrap theme --> 
    <link href="/css/bootstrap-theme.min.css" rel="stylesheet"> 

    <!-- Custom styles for this template --> 
    <link href="theme.css" rel="stylesheet"> 

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> 
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> 
    <script src="../../assets/js/ie-emulation-modes-warning.js"></script> 

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
    <!--[if lt IE 9]> 
     <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
     <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
    <![endif]--> 

    <!--Report Card CSS--> 
    <link rel="stylesheet" href="/js/reportcard/css/badges.css"> 

    </head> 

    <body role="document"> 

    <!-- Fixed navbar --> 
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> 
     <div class="container"> 
     <div class="navbar-header"> 
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 
      <span class="sr-only">Toggle navigation</span> 
      <span class="icon-bar"></span> 
      <span class="icon-bar"></span> 
      <span class="icon-bar"></span> 
      </button> 
      <a class="navbar-brand" href="#">Bootstrap theme</a> 
     </div> 
     <div id="navbar" class="navbar-collapse collapse"> 
      <ul class="nav navbar-nav"> 
      <li class="active"><a href="#">Home</a></li> 
      <li><a href="#about">About</a></li> 
      <li><a href="#contact">Contact</a></li> 
      <li class="dropdown"> 
       <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a> 
       <ul class="dropdown-menu" role="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 class="dropdown-header">Nav header</li> 
       <li><a href="#">Separated link</a></li> 
       <li><a href="#">One more separated link</a></li> 
       </ul> 
      </li> 
      </ul> 
     </div><!--/.nav-collapse --> 
     </div> 
    </nav> 
+0

http://reportcard.rileyh.com/instructions.html – 2014-10-30 18:24:40

回答

2

您還沒有列入bootstrap.js你的文件。它有使其工作的代碼。

+0

它包含在底部https://github.com/twotimes22/twotimes22.github.io/blob/master/index.html – 2014-10-30 18:15:02

+1

如果我去到您的網站「www.thomasweld.com」在Chrome上,並打開開發工具 - >控制檯(F12),看起來您的依賴不能正確加載。你應該仔細檢查這些路徑。 – Will 2014-10-30 18:33:22

+0

同意@威爾路徑對我來說也沒有任何意義。 – Rohan 2014-10-30 19:43:16