- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
jquery性能优化手册(The performance optimization of jQuery manual)
jquery性能优化手册(The performance optimization of jQuery manual) Now more and more jQuery applications, some of my classmates were enjoying a refreshing coding will ignore the dripping performance, problems such as me. Although jQuery in many of the JS libraries in performance is good, but not used JavaScript in the development of primary, performance problems still need attention. jQuery Performance Rules this article. In twitter, a simple translation: Always inherits from the ID selector Using tag before class Cache the jQuery object Have a strong chain operation Using subquery Restrict direct DOM operation Bubble Elimination of invalid queries Defer to $(window).Load Compressed JS Fully grasp the jQuery Library 1. always inherits from the ID selector The fastest selector in jQuery is the ID selector because it comes directly from the getElementById () method of the Javascript div id= content form method=, post, action= / h2Traffic Light/h2 ul id= traffic_light liinput type= radio class= on name= light value= red Red/li liinput type= radio class= off name= light value= yellow Yellow/li liinput type= radio class= off name= light value= green Green/li /ul input class= button id= traffic_button type= submit value= Go / /form /div Choosing buttons like this is inefficient: Var traffic_button = $(#content,.Button); The direct selection button with ID is more efficient: Var traffic_button = $(` #traffic_button ); Select multiple elements When it comes to multi element selection, youre actually talking about DOM traversal and loops. These are slower things. In order to improve performance, its better to start with the nearest ID Var traffic_lights = $(#traffic_light, input); 2. use tag before class The second fast selector is the tag selector ($(` head )). The same is true because it comes from the native getElementsByTagName () method div id= content form method=, post, action= / h2Traffic Light/h2 ul id= traffic_light liinput type= radio class= on name= light value=
您可能关注的文档
- dmso(DMSO).doc
- dna回收技术总结(DNA recovery technology summary).doc
- dna分子杂交(DNA molecular hybridization).doc
- dnf中赚钱方法及npc送礼(DNF ways to make money and NPC gifts).doc
- dnf远古一套流程(DNF ancient set of processes).doc
- dnp屏(DNP screen).doc
- dnf附魔收费表,1月25日更新(DNF enchant fee list updated in January 25th).doc
- dnf远古第一套任务流程(DNF ancient first mission process).doc
- dos之bat批处理文件语法介绍(DOS bat batch file syntax introduction).doc
- dota50小技巧(dota50小技巧).doc
- js类型转换(JS type conversion).doc
- ky阅读(KY reading).doc
- lastsave(lastsave).doc
- linux wait与waitpid函数的深入分析(A thorough analysis of Linux wait and waitpid function).doc
- linux习题(Linux exercises).doc
- linux上如何虚拟的磁盘设备(How the virtual disk devices on Linux).doc
- linux链接文件总结(Linux link file summary).doc
- listening-(已读讲座)(听(已读讲座)).doc
- lua(Lua).doc
- lyelfk托福经验(lyelfk托福经验).doc
最近下载
- 北京市2019年中考英语真题(含答案).pdf VIP
- 2022年新高考政治真题试卷(山东卷).pdf VIP
- 2025年必威体育精装版详版征信报告个人信用报告样板模板word格式新版可编辑.docx VIP
- 辽宁省大连市甘井子区2024-2025学年上学期七年级 月考英语试卷(10月份).docx VIP
- 水土保持监督管理培训课件.pptx VIP
- 《现代汉语》各章练习题答案汇总 .pdf VIP
- 输变电工程环境保护和水土保持全过程管控培训课件.pptx VIP
- 生产建设项目水土保持方案管理办法培训课件.pptx VIP
- 培训课件_1411dxs小天鹅纯臻2.0新品1411DXS系列.pdf VIP
- 2022年内蒙古农业大学硕士研究生入学考试公共管理专业综合基础考研真题.pdf VIP
文档评论(0)