I have a timeline with small pins on it that, when hanging over, slide up or down, and then the inscriptions are displayed. When the mouse leaves, the header should disappear, and the pin moves back. This works, but using the code that I use, if the mouse moves too fast, it does not detect that the mouse is leaving. How can i fix this?
PS, the only reason I use mouse on / off is because I think I needed to use live () as my elements are added dynamically after the document loads.
$('#about-me .progress-bar .progress .notes li.personal').live('mouseenter',function(){ $(this).animate({ top:25 }, 200, function(){ $(this).find('.caption').stop(true, true).fadeIn(200); }); }).live('mouseleave',function(){ $(this).find('.caption').stop(true, true).delay(200).fadeOut(200,function(){ $(this).parents('li').animate({ top:30 },200); }); });
Henryz
source share