允许点击twitter bootstrap下拉菜单切换链接? [英] Allow click on twitter bootstrap dropdown toggle link?

查看:125
本文介绍了允许点击twitter bootstrap下拉菜单切换链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经设置了twitter引导下拉菜单来停止工作(而不是单击[是的,我们知道触摸设备上没有悬停])。但是,当我们点击它时,我们希望能够使主链接工作。

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阻止它,那么我们如何重新启用它? p>

By default twitter bootstrap blocks it, so how can we re-enable it?

推荐答案

只需将禁用添加为您的锚点上的一个类:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆