0

我有同样的问题:

显示工具提示前的延迟

在显示工具提示之前我需要延迟。

所以我想使用hoverIntent插件。

我不明白如何组合这两个插件。

$("#demo2 li").hoverIntent( makeTall, makeShort )

$("#demo2 li").simpletip()

一起

$("#demo2 li").hoverIntent(
       $("#demo2 li").simpletip("show"),
       $("#demo2 li").simpletip("hide")
)

对我不起作用。

有人可以帮忙吗?

4

1 回答 1

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);
});

也许是一个日历插件,或者一个不错的对话框。但不是为了延迟悬停。

于 2012-06-21T08:14:15.483 回答