/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("someelement").mouseenter(function(){ clearTimeout($(this).data('timeoutId')); $(this).find(".tooltip").fadeIn("slow"); }).mouseleave(function(){ var someelement = this; var timeoutId = setTimeout(function(){ $(someelement).find(".tooltip").fadeOut("slow");}, 650); $(someelement).data('timeoutId', timeoutId); });
Comments
