在php的任何页面中包含此侧边栏菜单代码时,下拉列表正在点击,但再次点击时菜单不会上升

时间:2016-03-30 10:18:47

标签: css twitter-bootstrap-3 drop-down-menu onclick sidebar

<link href="css/SideMenuBar.css" rel="stylesheet">
<!-- Latest compiled and minified CSS -->

<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.css" />
<script src="js/bootstrap.js"></script>
<!-- Optional theme -->

<div class="nav-side-menu">
     <div class="menu-list">

            <ul id="menu-content" class="menu-content collapse out">
                <li>
                  <a href="#">
                  <i class="fa fa-dashboard fa-lg"></i> Dashboard
                  </a>
                </li>

                 <li data-toggle="collapse" data-target="#service" class="collapsed">
                  <a href="#"><i class="fa fa-globe fa-lg"></i> Services <span class="arrow"></span></a>
                </li>  
                <ul class="sub-menu collapse" id="service">
                  <li>New Service 1</li>
                  <li>New Service 2</li>
                  <li>New Service 3</li>
                </ul>
            </ul>
    </div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>

根据给出的代码,当我们点击服务时会在侧栏中的下拉菜单中显示更多选项,但是当我们再次点击关闭它时,它不会关闭。

0 个答案:

没有答案