Bootstrap Navbar下拉列表不起作用

时间:2015-04-03 14:40:21

标签: html css twitter-bootstrap html-helper

嗨,所以即时创建一个Bootstrap 3网站,但我的dropdown dosnt似乎正在我的导航栏上工作,这是我的代码:



<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
      <title>Joosh - Welcome</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
      <!-- Linking CSS Stylesheets -->
      <link href="css/bootstrap.min.css" rel="stylesheet">
      <link href="css/bootstrap-theme.min.css" rel="stylesheet">
      <link href="css/customStyle.css" rel="stylesheet">
  </head>
    <body>
        
    <!-- Navigation Bar Top - Open -->
    <nav class="navbar navbar-default">
      <div class="container">
          <div class="container-fluid">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <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="#">Joosh</a>
            </div>
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
              <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Home</a></li>
                <li><a href="#">News</a></li>
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Social Media <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><a href="#">Separated link</a></li>
                  </ul>
                </li>
              </ul>
            </div>
          </div>
      </div>
    </nav>
    <!-- Navigation Bar Top - Closed -->
    
      <!-- Linking JavaScript Resources -->
      <script src="js/jquery-1.11.2.min.js"</script>
      <script src="js/bootstrap.min.js"></script>
    </body>
</html>
&#13;
&#13;
&#13;

我已经尝试将JavaScript置于头部,但仍然似乎有效。关于问题的任何想法,我也尝试从googleapi的网站和jquerys网站获取jquery。

1 个答案:

答案 0 :(得分:2)

这可能是个问题:

您错过了&#34;&gt;&#34;

  <script src="js/jquery-1.11.2.min.js"</script>
  <script src="js/bootstrap.min.js"></script>

  <script src="js/jquery-1.11.2.min.js"></script>
  <script src="js/bootstrap.min.js"></script>