答案 0 :(得分:1)
更改
onmouseout="onmouseout();"
类似
onmouseout="onmouseoutfncall();"
此外,您不必每次都添加和删除工具提示。只是展示并隐藏它。
$("a.screenshot").hover(function(){
var title_a = $(".screenshot").attr("rel");
var tip = $("#screenshot");
tip.children("span").text(title_a);
tip.show();
}
},
function(){
var tip = $("#screenshot");
tip.hide();
}).bind("mousemove", function(){
$("#screenshot").css({"top": "41px", "left": "41px"}).fadeIn("fast");
});
<p id='screenshot'><SPAN></SPAN></p>