hello... I cant seem to solve this on my own.

I've built a little tooltip hover widget that remains open even on
mouseout so as to allow the mouse to click inline links etc. but it
does not disappear when the mouse just moves off the <span id="tools">

I think the code below is totally wrong structure but I can't
logically figure out how I need to build this right.

$('#tools').hoverhelp('this is help text',1);


$.fn.hoverhelp = function(txt,sticky) { // second attribute is used in
switch () below
return this.each(function() {
$(this).hover(
function(e){ // mouseover '#tools'
$('#helpdiv').html(txt);
},
function(){ // mouseout '#tools'
switch(sticky){
case 1 : // keep tooltip open
$('#hoverhelp').hover(
function(){$(this).show();},
function(){$(this).hide();}
);
break;
default :
$('#hoverhelp').hide();
break;
}
}
);
});
};

Reply via email to