twitter bootstrap - Navbar collapse is not working in mobile version? -
my bootstrap navbar collapse not working in mobile version.
here code:
<nav class="navbars navbar-inverse"> <div class="row"> <div class=" col-xs-12 "> <div class="navbar-header " role="navigation"> <button type="button" class="navbar-toggle pull-left" data-toggle="collapse" data-target="#mynavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="collapse navbar-collapse" id="mynavbar"> <ul class="nav navbar-nav "> <li><a href="<?= site_url('api/about_us') ?>"> us</a></li> <li ><a href="<?= site_url('api/home') ?>"><span class="glyphicon glyphicon-home"></span> home</a></li> <li><a href="<?= site_url('api/regis') ?>"><span class="glyphicon glyphicon-user"></span> volunteer registration</a></li> <li><a href="<?= site_url('api/postingcomplaints') ?>"><span class="glyphicon glyphicon-comment"></span> post complaints</a></li> <li><a href="#" class=" pull-right" data-toggle="modal" data-target="#mymodal2"><span class="glyphicon glyphicon-map-marker"></span> track complaints</a></li> <li><a href="<?= site_url('api/contact') ?>"><span class="glyphicon glyphicon-phone-alt"></span> contact us</a></li> <li> <a href="#" class=" pull-right" data-toggle="modal" data-target="#mymodal"><span class="glyphicon glyphicon-log-in"></span>login</a></li> </ul> </div> </div> </div> </div> </nav> <!--nav end-->
can tel me doing wrong?
you need set 1. jquery , 2. javascript (order important!) in <head>
section.
<head> <script src="https://code.jquery.com/jquery-2.1.4.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head>
Comments
Post a Comment