简体   繁体   English

当我单击时,bootstrap toogle按钮不起作用

[英]bootstrap toogle button not working when i click

here is my code.kindly correct me where im wrong, as im new to bootstrap. 这是我的代码。请立即纠正我错误的地方,因为我是引导程序的新手。

the toggle button does not work in responsive 切换按钮在响应中不起作用

kindly guide ... 友善的指导...

<!--<link href="css/style.css" rel="stylesheet">-->
<link href="css/style.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<script type="text/javascript" src="js/bootstrap.js"></script>
<!--<script type="text/javascript" src="js/bootstrap.min.js"></script>-->

<body>
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" 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="#">Menu</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <nav class="navbar-collapse nav-collapse in" style="height: auto;">
            <ul class="nav nav-pills nav-justified sf-js-enabled" id="navigation">
                <li class="current"><a class="btn" href="index.html">Home</a></li>
                <li><a class="btn" href="our-advisors.html">Our Advisors</a></li>
                <li><a class="btn" href="destinations.html">Destinations</a></li>
                <li><a class="btn" href="special-deals.html">Special Deals</a></li>
                <li><a class="btn" href="gift-registery.html">Gift Registery</a></li>
                <li><a class="btn" href="philantrophy.html">Philantropy</a></li>
                <li><a class="btn" href="contact.html">Contact Us</a></li>
            </ul>
        </nav>
        </div><!-- /.container-fluid -->
    </nav>
</body>

This jquery file is required for the jquery functions to work. 该jquery文件是jquery函数正常工作所必需的。 The below file link is missing. 以下文件链接丢失。

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

Add the above line to your script then it will work fine........ 将以上行添加到脚本中,即可正常工作........

You need to insert html & head tags and also include jQuery... 您需要插入htmlhead标签,还需要包括jQuery ...

<script src='http://code.jquery.com/jquery-latest.min.js'></script>

This is how it should look like: 它应该是这样的:

<!DOCTYPE html>
<html>
  <head>
    <!-- all your includes and then jQuery -->
    <script src='http://code.jquery.com/jquery-latest.min.js'></script>
  </head>
  <body>
    <!-- Everything in your <body></body> tags
  </body>
</html>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM