【发布时间】:2014-07-03 04:39:27
【问题描述】:
我正在编写对静态 html 工作正常但对于动态的工具提示,它不起作用。
displayToolTips: function() {
$(function () {
$(".tooltipclass").tooltip({
disabled: true,
placement : 'bottom'
}).on("onchange", function () {
$(this)
.tooltip("enable")
.tooltip("open");
}).on("mouseleave", function () {
$(this)
.tooltip("close")
.tooltip("disable");
});
});
}
这是代码。和 html 是:
<div class="informationIcon tooltipclass margin-tooltip"
th:title="#{title.mainimage_title}">i</div>
我将这个内容写在动态追加的jQuery函数中,当我们将鼠标放在工具提示上时,它不显示信息。
请帮忙,在此先感谢。
我在这里分享小提琴,
请参阅此函数中的 displayDynamicRows(),它显示不显示信息的动态工具提示。
【问题讨论】:
-
1.为什么不设置一个Fiddle 以便人们可以实际使用它并帮助您使其工作? 2.你考虑过使用an existing Bootstrap Tooltip plugin吗? 3. 有没有考虑使用the popover plugin?
标签: jquery html twitter-bootstrap