【问题标题】:Bootstrap Tooltips initialising but not showing引导工具提示正在初始化但未显示
【发布时间】: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


【解决方案1】:

确实有效,只是在 jsfiddle 中,HTML 框外的所有内容都被隐藏了。

显示填充的更新版本:http://jsfiddle.net/ytpAy/3/

弗雷德

【讨论】:

    猜你喜欢
    • 2019-01-14
    • 2013-12-30
    • 2016-07-25
    • 1970-01-01
    • 1970-01-01
    • 2016-05-07
    • 2017-12-10
    • 2013-06-11
    相关资源
    最近更新 更多