手机版

jquery模仿的标题属性示例

时间:2021-09-09 来源:互联网 编辑:宝哥软件园 浏览:

用jQuery实现的模仿A的标题属性的例子,在测试的时候,ie6、7、7上有一个级别混淆,但是最终解决了。

Html代码如下:

div class=' wrap ' ul class=' listlclearfix ' lia href=' ui设计师/adiv class=' show ' PDE part:技术部/pp地点:郑州/pp招聘人数:21人/p/div/lilia href='前端开发工程师/Adiv class=' show ' PDE part:技术部/ppJob位置:郑州/ppRecruitment编号:21/p/div/lilia href='运维工程师/Adiv class=' show ' PDE part:技术部/ppJob位置:郑州/ppRecruitment编号:21/p/div/lilia href=' Adiv class=' show ' PDE part:技术部/pp工作地点:郑州/pp招聘编号:21/p/div/lilia href=' UI设计师/地点:郑州/ppRecruitment编号:21/p/div/lilia href=' Adiv class=' show ' pDepartment:技术部/pp工作地点:郑州/pp招聘编号:21/p/div/lilia href=' UI设计师/adiv class=' show' pDepartment:技术部/pp工作地点:郑州/pp招聘编号:21/p/div/lilia href=' Adiv class=' show ' pDepartment:技术部/ppJob地点:郑州/pprecruitry

* { margin:0划水:0;} body { font-size :12 px;}.包装{ width:600pxmargin:100px auto}.clearfix:after, clear fix : before { display : table;content :“”;} .clearfix:after在{ clear:both飞越:隐藏;}.clear fix { zoom : } 1;}.列表{ position:relative//作为定位的父元素,li直接成为父元素,元素内容重叠}。list Li { list-style : none;宽度width:100pxheight:24px线高:24 px;右边距:10 px;float:left}.列出阿利{ text-decoration : one;color: # 333显示:块;}.显示{ position:absolute宽度width:100pxbackground: # FFFFE1border:1px实心# ffcc01padding:6pxdisplay:nonez索引:5;margin-top :10 px;//替换top margin-left :60 px;//替换左侧}。显示p { height:18px行高:18 px;}.列表Li a : hover { text-decoration :下划线;color: # FF0000}jQuery代码如下:

脚本类型=' text/JavaScript ' $(function(){ var $ Li=$(')。换行')。find(' Li ');$li.bind('mouseover ',function(){$(this)。查找('。show’)。show();}).bind('mouseout ',function(){$(this)。查找('。show’)。hide();})})/脚本预览效果;

版权声明:jquery模仿的标题属性示例是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。