允许点击 twitter bootstrap 下拉切换链接吗? [英] Allow click on twitter bootstrap dropdown toggle link?
本文介绍了允许点击 twitter bootstrap 下拉切换链接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们已经设置了 twitter bootstrap 下拉菜单来处理悬停(而不是点击[是的,我们知道在触摸设备上没有悬停]).但是我们希望当我们点击它时主链接可以工作.
We have setup the twitter bootstrap dropdown to work on hover (as opposed to click [yes we are aware of the no hover on touch devices]). But we want to be able to have the main link work when we click it.
默认情况下,twitter bootstrap 会阻止它,那么我们如何重新启用它?
By default twitter bootstrap blocks it, so how can we re-enable it?
推荐答案
只需将 disabled 添加为锚上的类:
Just add disabled as a class on your anchor:
<a class="dropdown-toggle disabled" href="http://google.com">
Dropdown <b class="caret"></b></a>
所以所有的东西都像:
<ul class="nav">
<li class="dropdown">
<a class="dropdown-toggle disabled" href="http://google.com">
Dropdown <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
</ul>
</li>
</ul>
这篇关于允许点击 twitter bootstrap 下拉切换链接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文