Hi jquertil,
It could be that a tiny part of the tooltip is appearing right where the mouse position is. If the tooltip gets in between your mouse and the hovered element, it'll flicker off and on. Try offsetting the top or left position, or both.
--Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 27, 2008, at 8:37 PM, jquertil wrote:
I use this extension code to make a hover tooltip. I want the tooltip (a div with position:absolute) to display on top of the hovered element. This works great. But when moving the mouse, the mouseout and mouseover events are being fired all the time, causing a flicker effect. How do I escape that? I tried to place a 'return false' in the hover but no luck. $.fn.hoverhelp = function(txt) { $T = $(this).position().top; $L = $(this).position().left; $(this).hover( function(e){$('#hoverhelp').empty().html(txt).css({top:$T,left: $L}).show();return false;}, function(){$('#hoverhelp').hide();} ); };