对于熟悉前端开发的小伙伴,相信对于Jquery一定不陌生,相对于Javascript的繁琐,Jquery更加的简洁,当然简洁不意味着简单,我们可以使用Jquery完成我们想要实现全部功能,这里为小白们分享一下关于Jquery的事件和文档操作,便于小白们快速上手。
一、事件操作:
Jquery事件操作测试 .ul{min-width:300px;height:25px;} .ul2{margin-top:20px;} .ul li{float:left;min-width:50px;height:25px;line-height:25px;margin-left:10px;background-color:#DFE0DF;color:#f54372;text-align:center;cursor:pointer;}
- 第一项
- 第二项
- 第三项
- 第四项
- 第五项
radio checkbox
- 第一项span
- 第二项
- 第三项
- 第四项
- 第五项
二、文档操作:
jQuery文档操作 ul{display:inline-block;} li{float:left;min-width:80px;height:40px;line-height:40px;margin-right:20px;border-radius:5px;background-color:#DFE0DF;color:#f54372;text-align:center;cursor:pointer;} p.select{color:#f54372;} 第一段文字
第二段文字
- addClass()
- after()
- before()
- append()
- attr()
- empty()
- hasClass()
- html()
- css()
- height()
- offset()
- offsetParent()
- position()
- scrollLeft()
- scrollTop()
- width()
以上便是我总结的Jquery中我们经常使用到的操作。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持考高分网!



