0

I have the same question like this:

Delay before showing the tooltip

I need a delay before showing the tooltip.

So i want to use the hoverIntent plugin.

I don't understand how to combine the two plugins.

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

and

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

together

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

does not work for me.

Can anyone help, please?

Community
  • 1
  • 1
Keith L.
  • 2,084
  • 11
  • 41
  • 64

1 Answers1

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

Maybe a plugin for a calendar, or a nice dialog. But not for a delay on hovers.

Sem
  • 4,477
  • 4
  • 33
  • 52