引导多&QUOT控制;数据切换" [英] Bootstrap control with multiple "data-toggle"

查看:151
本文介绍了引导多&QUOT控制;数据切换"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有通过数据肘节来分配一个以上的事件,以自举控制的方式
例如,可以说,我想,有一个提示,并分配一个按钮切换按钮
它。结果
试图数据切换=提示按钮,而只是工具提示工作。

编辑:

这是很容易workaroundable以

<$p$p><$c$c>this.$(\"#newbtn\").toggleClass(\"active\").toggleClass(\"btn-warning\").toggleClass(\"btn-success\");


解决方案

如果您要添加的模式和工具提示无添加JavaScript或改变提示功能,你也可以简单地包裹一个元素它周围的:

 &LT;跨度数据切换=莫代尔数据目标=#ID&GT;
    &LT;一个数据切换=提示数据放置=顶称号=我的文本工具提示!&GT + LT; / A&GT;
&LT; / SPAN&GT;

Is there a way to assign more than one event to a bootstrap control via "data-toggle" For example, lets say I want a button that has a "tooltip" and a "button" toggle assigned to it.
Tried data-toggle="tooltip button", but only the tooltip worked.

EDIT:

This is easily "workaroundable" with

this.$("#newbtn").toggleClass("active").toggleClass("btn-warning").toggleClass("btn-success");

解决方案

If you want to add a modal and a tooltip without adding javascript or altering the tooltip function, you could also simply wrap an element around it:

<span data-toggle="modal" data-target="#id">
    <a data-toggle="tooltip" data-placement="top" title="My Tooltip text!">+</a>
</span>

这篇关于引导多&QUOT控制;数据切换&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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