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:
Operations
link, I want user to go to my /operations/
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?
Couldn't you just split the Operations link into a new <a>
tag?
<div class="navbar navbar-inverse">
<li class="dropdown" id="myTools">
<a href="/operations/" style="display:inline-block;padding-right:0px;">Operations</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#myTools" style="display:inline-block;padding-left:0px;">
<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>
Are you looking for something like this?
<div class="btn-group">
<a href="http://google.com" target="_blank" class="btn btn-link">Action</a>
<a href="#" class="btn btn-link dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/mypage1/">MyPage 1</a></li>
<li><a href="/mypage2/">MyPage 2</a></li>
</ul>
</div>
http://jsfiddle.net/UtDqm/6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With