function titleA(name) { var x=10; var y=10; $(name).mouseover(function(e){ this.myTitle=this.title; this.title=""; this.imgTitle = this.myTitle?"<br/>" + this.myTitle :"" var tooltip="<div id='tplink'>"+this.myTitle+"</div>"; $(this).parent().append(tooltip); setTimeout(function(){ $("#tplink").show(); },1000) }).mouseout(function(){ this.title=this.myTitle; $("#tplink").remove(); }).mousemove(function(e){ $("#tplink").css({"top": (e.pageY+y) + "px","left": (e.pageX+x) + "px"}); }) }
jQuery:超链接title提示和图片提示效果
最新推荐文章于 2018-09-09 15:48:00 发布