I'm trying to figure out how best i can get the following layout in Bootstrap 3 RC2.
Where the left items are the primary nav UL, and the side icons, are an additional UL or just a set of links that share a common look, but provide a dropdown or hide/show toggle for their content (list for the group, but hoping to do an interactive search and cart display for the others).
Currently, this plays fine when i do this code:
<div class="nav-wrapper" style="height: 56px;">
<div class="nav-primary affix-top">
<nav class="navbar" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-primary-collapse">
<span class="sr-only">Primary navigation</span>
<i class="icon-list"></i>
</button>
<button type="button" class="navbar-toggle pull-right" data-toggle="collapse" data-target=".navbar-cart-collapse">
<span class="sr-only">Itinerary navigation</span>
<span class="icon-calendar-empty"></span>
</button>
<button type="button" class="navbar-toggle pull-right" data-toggle="collapse" data-target=".navbar-user-collapse">
<span class="sr-only">User navigation</span>
<span class="icon-user"></span>
</button>
<button type="button" class="navbar-toggle pull-right" data-toggle="collapse" data-target=".navbar-search-collapse">
<span class="sr-only">Search navigation</span>
<span class="icon-search"></span>
</button>
</div>
<div class="row">
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="col-lg-8 col-sm-8 navbar-collapse navbar-primary-collapse in" style="height: auto;">
<ul id="navPrimary" class="nav navbar-nav">
<li class="first" id="navRegions"><a href="/regions/">Regions</a></li>
<li id="navWineries"><a href="/wineries/">Wineries</a></li>
<li id="navExplore"><a href="/explore/">Explore</a></li>
<li class="last" id="navEvents"><a href="/events/">Events</a></li>
</ul>
</div><!-- /.navbar-primary-collapse -->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="col-lg-4 col-sm-4 pull-right collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#"><i class="icon-search"></i></a>
<div id="prime-nav-searchform" class="dropdown-menu"> <form method="get" action="http://antonibotev.com/themes/nova/" class="search-form">
<i class="icon-search searchform-icon"></i>
<input class="bluebox-search-input" type="text" name="s" value="Search..." onfocus="" onblur="" autocomplete="off" data-view-all-title="Show All Results" data-original-title="">
<input type="submit" class="submit" value="" onfocus="" onblur="">
<div class="search-form-autocomplete active">
<div class="search-results-autocomplete">
</div>
</div>
</form>
</div>
</li>
<li class="dropdown"><a href="#" class="dropdown-toggle"><i class="icon-user"></i> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Log In</a></li>
<li><a href="#">Sign Up</a></li>
<li><a href="#">How It Works</a></li>
<li><a href="#">Need Help?</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-calendar-empty"></i> <span>4</span></a>
<ul class="dropdown-menu">
<li><a href="#">View Itinerary</a></li>
<li><a href="#">Check Out</a></li>
<li><a href="#">Need Help?</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</div>
</nav>
</div>
</div>
And this works fine for the initial collapse, but i need additional ones, but currently they need to live in the same UL, which obviously makes an issue with creating the 3 other collapse divs.
I even have the code to toggle the collapses if you say click on search or cart. It will only show you one at a time: opening one and closing the other
// mobile toggles - make sure when one navbar-collapse is open, that the others are closed
$('.navbar-collapse').on('show.bs.collapse', function (e) {
// hide open menus
$('.navbar-collapse').each(function(){
if ($(this).hasClass('in')) {
$(this).collapse('toggle');
}
});
});
The small and xs breakpoints should show the same layout, but of course replace the primary nav with an icon. Idea is that you have 4 icons to simply click or tap to toggle their respective menus, whether those menus contain a list or just a search form.
Any suggestions?