javascript - Bootstrap navbar doesn't collapse when visit from mobile device, works fine when I shrink desktop browser -


i have index.html , require bootstrap.css , bootstrap.js.when shrink desktop browser on desktop, navbar collapses properly. when visit site on mobile device,everything responsive except navbar,it doesn't collapse here code in head

<head>         <meta charset="utf-8">         <meta http-equiv="x-ua-compatible" content="ie=edge">         <title>sylhet international university</title>         <meta name="description" content="">          <meta name="viewport" content="width=device-width, initial-scale=1">          <link rel="stylesheet" href="css/normalize.css">         <link rel="stylesheet" href="css/loaders.min.css" />         <link rel="stylesheet" href="css/jquery.bxslider.css" />         <link rel="stylesheet" href="css/default/default.css" type="text/css" media="screen" />         <link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />         <link rel="stylesheet" href="css/jquery.akordeon.css">         <link rel="stylesheet" href="css/bootstrap.min.css">         <link rel="stylesheet" href="css/main.css">         <link rel="stylesheet" href="css/responsive.css">         <script src="js/vendor/modernizr-2.8.3.min.js"></script>     </head> 

in body

    <!--navigation starts--> <div class="navigation">     <nav class="navbar navbar-default navigation_bar scroll_border navbar-fixed-top">         <div class="container ">             <div class="navbar-header">                 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-nav">                     <span class="sr-only">toggle navigation</span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                 </button>             </div>             <div class="collapse navbar-collapse" id="main-nav">                 <ul class="nav navbar-nav">                     <li class="active"><a href="#">home</a></li>                     <li><a href="#">about</a></li>                     <li><a href="#">gallery</a></li>                     <li><a href="#">news</a></li>                     <li><a href="#">blog</a></li>                     <li><a href="#">admission</a></li>                     <li><a href="#">courses</a></li>                     <li><a href="#">contact</a></li>                 </ul>             </div>         </div>     </nav> </div> <!--navigation ends--> 

in footer

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>     <script>window.jquery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>     <script src="js/bootstrap.js"></script>     <script src="js/plugins.js"></script>     <script src="js/main.js"></script> 

you need have bootstrap.min.js in scripts:

<script src="path/to/bootstrap.min.js"></script> 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -