【发布时间】:2012-08-29 06:55:50
【问题描述】:
我正在尝试设置引导工具提示,但它似乎不起作用。
<p>This is a <a href="#" title="A collection of words.">sentence</a> with a tooltip</p>
和
$(document).ready(function(){
$("a").tooltip();
});
我设置了以下jsFiddle
html 似乎已转换为以下内容:
<p>This is a <a href="#" data-original-title="A collection of words.">sentence</a> with a tooltip</p>
并且工具提示html被渲染:
<div class="tooltip fade top in" style="top: -34px; left: 20.5px; display: block; "><div class="tooltip-arrow"></div><div class="tooltip-inner">A collection of words.</div></div>
使用正确的 CSS 样式:
但它从不显示在浏览器中?
【问题讨论】:
-
不可以通过添加data-placement="bottom"来显示底部吗?
-
好点 - jsFiddle 中的问题是它被 iframe 隐藏了。我的生产代码和 jsFiddle 之间的细微差别..
-
哎呀...失败了!我会看看为什么这不适用于我的生产代码,一定是别的东西。
-
能给个链接吗?或粘贴您的代码进行检查
-
它在内部 SharePoint 上,我会看看我是否可以在外部复制 - 以为我在 jsFiddle 中拥有它,但它让我明白了!好..
标签: javascript jquery twitter-bootstrap tooltip