jquery工具工具提示没有出现在hide()之后的第一次尝试 [英] jquery tools tooltip doesn't appear in first try after hide()
本文介绍了jquery工具工具提示没有出现在hide()之后的第一次尝试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用工具提示
获取< div>
它会 hide()
几秒钟之后
如果我将鼠标悬停在它之后触发它
这是第一次它不会只有在我第二次将鼠标移到它上面后才显示
我使用 onShow
事件进行绑定和使用 window.setTimeOut
I've used tooltip
for a <div>
It will hide()
after couple of seconds
If I'll mouse over it's trigger after it
for the first time it will not appear
only after I move the mouse over it the second time it will appear
I used onShow
event for binding and used window.setTimeOut
是工具提示还是jquery中的问题?
is it a problem in the tooltip or in jquery?
这样的事情:
$(document).ready(function() {
x = $("button").tooltip({
api: true,
position: "center right",
onShow: function() {
var hid = function() {
x.getTip().hide();
};
window.setTimeout(hid, 2000);
}});
x.show();
});
推荐答案
好吧,我已经修好了:
在这里回答:
well, I've fixed it: answer here:
$(document).ready(function() {
x = $("button").tooltip({
api: true,
**effect:"fade"**,
position: "center right",
onShow: function() {
var hid = function() {
**x.hide();**
};
window.setTimeout(hid, 2000);
}});
x.show();
});
这篇关于jquery工具工具提示没有出现在hide()之后的第一次尝试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文