如图:
<script> <BR>$(function(){ <BR>var x = 10; <BR>var y = 20; <BR>$("a.tooltip").hover(function(){ <BR>var title = this.title; <BR>$("a.tooltip").attr("newTitle",this.title); <BR>this.title = ''; <BR>var $div = $("<div id='newTip'><img src='"+this.href+"'/ alt="jQuery实现图片信息的浮动显示实例代码_jquery" ><br/>"+this.newTitle+"</script>
");
$("body").append($div);
$div.css({"position":"absolute","background":"silver"}).show("fast");
},function(){
this.title = this.newTitle;
$("#newTip").remove();
}).mousemove(function(e){
var $div = $("#newTip").css({"left":(e.pageX+x)+'px',"top":(e.pageY+y)+'px'}).show("fast");
});
})