Vote count:
0
I've noticed that when I resize my window to toggle my menus using boostrap and click the collapsed button it closed automatically by itself. The same happened with my other navbar toggle,
heres my code:
<nav class="navbar navbar-static-top" id="header" role="navigation">
<div class="container-fluid navbar-inverse">
<div class="nav navbar-left header_logo">
<a href="<?php echo home_url(); ?>"><img src="<?php bloginfo('template_directory'); ?>/img/logo.png"></a>
</div>
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbarHeaderCollapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse header_menu" id="navbarHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<?php
$menuargs = array(
'theme_location' => 'main-menu',
'container' => '',
'menu_class' => '',
'menu_id' => '',
'items_wrap' => '%3$s',
);
wp_nav_menu($menuargs);
?>
</ul>
</div><!-- /.header_menu -->
</div><!-- /.container-fluid -->
</nav> <!-- end of id header -->
asked 2 mins ago
bootstrap toggle closing by itself when click open
Aucun commentaire:
Enregistrer un commentaire