I have a navbar and I have a caret next to dropdown menu.
In current code, if user clicks Operations text or caret, dropdown menu is opened. But I need this:
- If user clicks
Operationslink, I want user to go to my/operations/page. - If user clicks to the caret, dropdown menu will be visible. If user click one of the elements of dropdown menu, user will be redirected to related page.
Fiddle: http://jsfiddle.net/mavent/UtDqm/2/
<div class="navbar navbar-inverse">
<li class="dropdown" id="myTools">
<a class="dropdown-toggle" data-toggle="dropdown" href="#myTools">
Operations
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/mypage1/">MyPage 1</a></li>
<li><a href="/mypage2/">MyPage 2</a></li>
</ul>
</li>
</div>
In Twitter bootstrap documentation it is noted how to create split button dropdowns here. I don't want to use buttons. Is it possible to have split behaviour without using buttons. Just with links?
dropdown-toggleand add a normalhrefto the operations text? See here - Joshua Mastyle set to bedisplay: block? Thats all I can think of, as it works fine for me. - Joshua Ma { display: block }? This could be pushing the caret down onto the next like as the two<a>tags round the text and caret are being forced onto new lines. Is there anywhere I could view your working code? - Joshua M<a>tags aredisplay:blockas Joshua mentioned. If you override them todisplay:inline-block;it works. - Steve Valliere