Navbar-collapse不工作 - Bootstrap + Github [英] Navbar-collapse not working - Bootstrap + Github

查看:144
本文介绍了Navbar-collapse不工作 - Bootstrap + Github的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以这是第三次,我擦掉了一切清洁从我的回购,从头开始,因为这个问题..我不熟悉js或jquery所以很多这是在我的头,只是希望使它的功能。我从引导复制主题,它工作正常在第一..我添加了reportcard.js功能和导航折叠菜单停止工作。

So this is the 3rd time I've wiped everything clean from my repo and started from scratch because of this issue.. I am not familiar with js or jquery so a lot of this is over my head, just hoping to make it functional. I copied the theme from bootstrap and it was working fine at first.. I added the "reportcard.js" feature and the nav-collapse menu stopped working.

这是我的github addy - https: //github.com/twotimes22/twotimes22.github.io
网站现在位于www.thomasweld.com

Here is my github addy - https://github.com/twotimes22/twotimes22.github.io Site is live at www.thomasweld.com

这是我的代码通过Nav

Here is my code up through the Nav

<!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>


推荐答案

您尚未将bootstrap.js文件。它有让它工作的代码。

You haven't included the bootstrap.js in your document. It has the code to make it work.

这篇关于Navbar-collapse不工作 - Bootstrap + Github的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆