我已经使用jquery ui创建了一个工具提示,但是当我使用键盘导航时,工具提示内容只出现一次,并且再也不会出现。
你知道为什么会发生这种情况吗?
$('.test').tooltip({
tooltipClass: "tip-style",
position: {
my: "left center",
at: "right center"
},
content: function() {
return $('#tip-content').html();
}
});我的工作示例:http://jsfiddle.net/WQpGE/
发布于 2013-03-26 07:36:55
我想这是因为工具提示文档说content:方法应该是一个回调或字符串
支持多种类型:
Function: A callback which can either return the content directly,
or call the first argument, passing in the content, e.g.,
for Ajax content.
String: A string of HTML to use for the tooltip content.我通过创建一个命名函数并在content方法中引用它来编辑您的代码。而且它看起来像预期的那样工作。
http://jsfiddle.net/WQpGE/3/
https://stackoverflow.com/questions/15610578
复制相似问题