Twitter引导工具提示指示不起作用? [英] Twitter bootstrap tooltip directions not working?
问题描述
我注意到我的twitter bootstrap工具提示不尊重数据位置
。
所以,我走了过来到
这不是一个bug,但我们需要初始化
重要 Bootstrap网站声明出于性能原因,工具提示和popover数据apis是选择加入的,这意味着你必须自己初始化它们。 Bootstrap网站工具提示部分
< div class =navbar tooltip-demo>
< ul class =nav>
< li>< a class =toptitle =data-placement =topdata-toggle =tooltiphref =#data-original-title =工具提示在顶部 >顶部的工具提示< / a>< / li>
< li>< a class =righttitle =data-placement =rightdata-toggle =tooltiphref =#data-original-title =右边的工具提示 >右侧的工具提示< / a>< / li>
< li>< a class =bottomtitle =data-placement =bottomdata-toggle =tooltiphref =#data-original-title =工具提示在底部 >底部的工具提示< / a>< / li>
< li>< a class =lefttitle =data-placement =leftdata-toggle =tooltiphref =#data-original-title =左侧工具提示 >左侧的工具提示< / a>< / li>
< / ul>
< / div>
要使用的javascript,您必须初始化
$('a')。tooltip();
I noticed that my twitter bootstrap tooltips were not respecting data-position
.
So, I headed over to the Twitter Bootstrap tooltips demo, specifically looking at the "Tooltip on X" examples, and this is what I get:
It looks like there is no support for the direction?
But, the popovers, which the tooltips inherit from (or possibly it's the other way around?) work:
Browsers tried:
Chromium 24.0 on Ubuntu 12.10
Firefox 19.0 on Ubuntu 12.10
Is this a bug that should be reported, or something else going on here?
Jsfiddle Jsfiddle with tooltip working
Its not a bug , but we need to initialize them .
Important Bootstrap website states "For performance reasons, the tooltip and popover data-apis are opt in, meaning you must initialize them yourself." Bootstrap website Tooltip section
<div class="navbar tooltip-demo">
<ul class="nav">
<li><a class="top" title="" data-placement="top" data-toggle="tooltip" href="#" data-original-title="Tooltip on top">Tooltip on top</a></li>
<li><a class="right" title="" data-placement="right" data-toggle="tooltip" href="#" data-original-title="Tooltip on right">Tooltip on right</a></li>
<li><a class="bottom" title="" data-placement="bottom" data-toggle="tooltip" href="#" data-original-title="Tooltip on bottom">Tooltip on bottom</a></li>
<li><a class="left" title="" data-placement="left" data-toggle="tooltip" href="#" data-original-title="Tooltip on left">Tooltip on left</a></li>
</ul>
</div>
The javascript to use , you will have to initialize
$('a').tooltip();
这篇关于Twitter引导工具提示指示不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!