[英]Bootstrap 3 Navbar toggle Not Functioning
My navbar's toggle button refuses to work. 我的导航栏的切换按钮无法正常工作。 The code I'm using has been copied and pasted from a Bootstrap template with a fully functional navbar. 我正在使用的代码已从具有完整功能导航栏的Bootstrap模板复制并粘贴。 I don't know what's up. 我不知道怎么了
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
<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="#page-top">Name</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="hidden">
<a href="#page-top"></a>
</li>
<li class="page-scroll">
<a href="#portfolio">Home</a>
</li>
<li class="page-scroll">
<a href="#about">Downloads</a>
</li>
<li class="page-scroll">
<a href="#contact">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
Here's the script tags to the JavaScript and jQuery files. 这是JavaScript和jQuery文件的脚本标签。 They've been left unmodified. 他们没有被修改。
<!-- jQuery -->
<script src="js/jquery.js" />
<!-- Latest compiled and minified JavaScript -->
<script src="js/bootstrap.js" />
You didn't identify anything to drop down. 您没有发现任何要下降的东西。 You need a list of things, using an unordered list. 您需要使用无序列表来列出事物。 All you have is the names of the buttons. 您所拥有的只是按钮的名称。 Please see bootstraps example below: 请参见下面的引导示例:
http://getbootstrap.com/components/#btn-dropdowns http://getbootstrap.com/components/#btn-dropdowns
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.