In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the advantages of jquery, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Jquery's advantages: 1, lightweight; 2, powerful selector; 3, excellent DOM operation encapsulation; 4, reliable event handling mechanism; 5, perfect Ajax;6, not polluting top-level variables; 7, excellent browser compatibility; 8, chain operation; 9, implicit iteration; 10, rich plug-in support; 11, perfect documentation, and so on.
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
13 advantages of jQuery
1. Lightweight
JQuery is very lightweight. After Packer compression written in Dean Edwards, the size is less than 30KB. If you use the Min version and enable Gzip compression on the server side, the size is only 18KB.
2. Powerful selector
JQuery allows developers to use almost all selectors from CSS1 to CSS3, as well as advanced and complex selectors created by JQuery. In addition, plug-ins can be added to support XPath selectors, and even developers can write their own selectors. Because JQuery supports selectors, developers with some CSS experience can easily jump into JQuery learning.
3. Excellent encapsulation of DOM operation
JQuery encapsulates a large number of commonly used DOM operations, making it easy for developers to write programs related to DOM operations. JQuery easily completes a variety of previously very complex operations, so that novice JavaScript can write excellent programs.
4. Reliable event handling mechanism
JQuery's event handling mechanism absorbs the quintessence of event handlers written by JavaScript expert Dean Edwards, and JQuery is quite reliable in handling event bindings. JQuery also does a very good job of setting aside an exit path, step by step, and non-intrusive programming ideas.
5. Perfect Ajax
JQuery encapsulates all Ajax operations in a function $.ajax (), allowing developers to concentrate on business logic when dealing with Ajax without worrying about complex browser compatibility and the creation and use of XMLHttpRequest objects.
6. non-polluting top-level variables
JQuery creates only one object called JQuery, and all its function methods are under this object. Its alias $can also exchange control at any time, absolutely will not pollute other objects. This feature is that JQuery can coexist with other JavaScript libraries and can be safely referenced in the project without considering later conflicts.
7. Excellent browser compatibility
As a popular JavaScript library, browser compatibility is one of the necessary conditions. JQuery can run normally under IE6.0+,FF 2 and Opera9.0+. JQuery also fixes some browser-to-browser differences so that developers don't have to build browser compatibility libraries before starting a project.
8. Chain operation mode
The most distinctive feature of JQuery is its chained operation, that is, for a set of actions that occur on the same JQuery object, it can be written directly without repeated acquisition of the object. This feature makes the JQuery code extremely elegant.
9. Implicit iteration
When you use JQuery to find all the elements with the ".myClass" class, and then hide them. There is no need to loop through each returned element. In contrast, the methods in JQuery are designed to automatically manipulate a collection of objects rather than individual objects, which makes a large number of loop structures unnecessary, thus greatly reducing the amount of code.
10. The separation of behavior layer and structure layer
Developers can use the selector to select the element and then add events directly to the element. This idea of completely separating the behavior layer from the structure layer allows JQuery developers and HTML or other page developers to do their job separately, getting rid of past development conflicts or individual development patterns. At the same time, post-maintenance is also very convenient, there is no need to find some functions in the HTML code and repeatedly modify the HTML code.
11. Rich plug-in support
The extensibility of JQuery attracts developers from all over the world to write JQuery extensions. At present, there are more than hundreds of official plug-ins supported, and there are constantly new plug-in interviews.
12. Perfect documentation
JQuery is very rich in documents. At this stage, there are many English documents and relatively few Chinese documents. Many JQuery-loving teams are working hard to improve JQuery Chinese documents, such as JQuery's Chinese API.
13. Open source
JQuery is an open source product that anyone is free to use and suggest modifications.
Thank you for reading this article carefully. I hope the article "what are the advantages of jquery" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.