function tip(evt,s){
$('p#vtip').show();
xOffset = -10; // x distance from mouse
yOffset = 10; // y distance from mouse
top = (evt.pageY + yOffset);
left = (evt.pageX + xOffset);
var str = $(s, "> #content").html();
$('p#vtip #content').html(str);
$('p#vtip').css("top", top+"px").css("left", left+"px").fadeIn("slow");
}
in firefox:
and in chrome and ie8 is always in the bottom:
who can change this code for chrome and ie8 ??
and this is html:
<div>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
<span onmouseover="tip(event,this);">程序错误<div id="content">good</div></span><br>
</div>
<p id="vtip" style="position:absolute"><img id="vtipArrow" src="vtip_arrow.png" />testtest<span class="content"></span></p>