/ Published in: JavaScript

Expand |
Embed | Plain Text
$("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); });
You need to login to post a comment.