Bootstrap工具提示,倒转其功能:显示全部并藏在悬停
我有一个带有许多工具提示的页面,首先我想显示全部。
他们都有一个“工具Tipwarn”类。
<span class='warning tooltipWarn'>test</span>
jQuery:
$('.tooltipWarn').tooltip({
placement: "bottom",
title: 'blablabla'
});
$('.tooltipWarn').tooltip("show");
这起作用了,我希望它们隐藏在悬停的地方。我已经做到了:
$('.tooltipWarn').hover(function(){
$(this).tooltip('hide');
})
悬停在工具提示本身时,我不会关闭工具提示,而不是文本
I have a page with many tooltips and I want to display all at first.
They all have a "tooltipWarn" class.
<span class='warning tooltipWarn'>test</span>
JQuery:
$('.tooltipWarn').tooltip({
placement: "bottom",
title: 'blablabla'
});
$('.tooltipWarn').tooltip("show");
This works, and I want them to be hidden on hover. I've done that:
$('.tooltipWarn').hover(function(){
$(this).tooltip('hide');
})
I wan't to close the tooltip when hovering the tooltip itself, not the text in
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

工具提示函数使用“工具提示”类生成文本。
因此此代码有效:
Tooltip function generates the text in a DIV with "tooltip-inner" class.
So this code works: