Heim  >  Artikel  >  Web-Frontend  >  jquery 简单的title显示插件_jquery

jquery 简单的title显示插件_jquery

WBOY
WBOYOriginal
2016-05-16 18:25:531136Durchsuche

学到插件 自己也倒弄出来一个。

效果图如下:

jquery 简单的title显示插件_jquery

代码如下:

').appendTo('body'); var d=$("#conBox"); this.bind({ mouseover:function(){ if(!$("#conBox")){ $('
').appendTo('body'); }else{ d=$("#conBox"); } var of=$(this).offset(); var title=$(this).attr("title"); //定义位置 d.css({top:of.top+$(this).height()+"px",left:$(this).width()/2+of.left+"px"}).text($(this).attr("title")); //显示 d.fadeIn(); }, mouseout:function(){ //鼠标一走隐藏 d.fadeOut(); } }); } }); //调用 $(".ll").showTitle(); });
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn