Bootstrap NavBar下拉列表

时间:2014-06-09 10:58:31

标签: javascript html html5 twitter-bootstrap twitter-bootstrap-2

ON BOOTSTRAP 2.3.2

当我点击它时,下拉菜单不会出现,尽管我正确引用它。在所有基于Bootstrap的Dropdown中,我都添加了一个CDN来读取(Javascript文件)。有些人请注意为什么这不起作用?谢谢:))

<html>
<head>
<!-- Title -->
<title>Control Panel</title>

<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="revisit-after" content="30 days">
<meta name="distribution" content="web">
<meta charset="UTF-8">

<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Twipply">

<!-- Stylesheet -->
<link href="stylesheet.css" type="text/css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/bootstrap/2.3.1/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" type="text/css" rel="stylesheet">

<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-static-top">
    <div class="navbar-inner"><div class="container">
        <a class="brand">MineRush Control Panel</a>
        <div class="pull-right">
            <ul class="nav">
                <li class="active"><a href="#">Home</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Punishments       <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li class="nav-header">PUNISHMENTS</li>
                      <li><a href="#">Ban Player</a></li>
                      <li><a href="#">Kick Player</a></li>
                      <li><a href="#">Warn Player</a></li>
                    </ul>
                  </li>
                <li><a href="#">Link</a></li>
              </ul>
        </div>
    </div></div>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

犯了一个错误,忘记在我的jQuery Libs中引用。 Woops

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>