我有同样的问题:
Delay before showing the tooltip
在显示工具提示之前我需要延迟。
所以我想使用hoverIntent插件。
我不明白如何组合这两个插件。
$("#demo2 li").hoverIntent( makeTall, makeShort )
和
$("#demo2 li").simpletip()
一起
$("#demo2 li").hoverIntent(
$("#demo2 li").simpletip("show"),
$("#demo2 li").simpletip("hide")
)
对我不起作用。
有人可以帮忙吗?
答案 0 :(得分:0)
var timeout = null;
$("#demo2 li").onmouseenter(function(){
clearTimeout(timeout);
timeout = setTimeout(function(){
$(this).fadeTo(1, "slow"); // or any other action
}, 300);
})
.onmouseleave(function(){
clearTimeout(timeout);
timeout = setTimeout(function(){
$(this).fadeTo(0.3, "fast"); // or any other action
}, 300);
});
可能是日历的插件,也可能是一个不错的对话框。但不是因为徘徊的延迟。