Home >Web Front-end >JS Tutorial >What are the characteristics of jquery
Features of jquery: 1. Lightweight js framework; 2. Rich DOM selector; 3. Chain expression; 4. Event, style, animation support; 5. Ajax operation support; 6 , Cross-browser compatibility; 7. Plug-in extension development; 8. Strong scalability.
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
1. What is JQuery?
JQuery is an excellent javascript framework.
JQuery is another excellent Javascript framework after Prototype. Its purpose is - WRITE LESS, DO MORE, write less code and do more things. It is a lightweight js library that is unmatched by other js libraries. It is compatible with CSS3 and various commonly used browsers.
JQuery is a fast, concise JavaScript library that enables users to more easily process HTML documents and events, achieve animation effects, and easily provide AJAX interactions for websites.
Another big advantage of JQuery is that its documentation is very complete and its various applications are explained in detail. There are also many mature plug-ins to choose from. JQuery can keep the code and html content of the user's html page separated. In other words, there is no need to insert a bunch of js in the html to call the command. You only need to define the id.
2. Features of JQuery
(1), a lightweight js framework
JQuery core js file is only tens of kb, which will not affect the page loading speed. Much lighter than Extjs.
(2), rich DOM selector
JQuery’s selector is very convenient to use. For example, to find the adjacent elements of a certain DOM object, you may have to write js It takes several lines of code, but JQuery can do it with just one line of code. For another example, if you want to change the color of every other row of a table, JQuery can do it with just one line of code.
(3), chain expression
JQuery’s chain operation can write multiple operations in one line of code, which is more concise.
(4), event, style, animation support
JQuery also simplifies the code for js to operate css, and the code is more readable than js.
(5), Ajax operation support
JQuery simplifies AJAX operations, and the background only needs to return a string in JSON format to complete communication with the front desk.
(6) Cross-browser compatibility
JQuery is basically compatible with current mainstream browsers, so you no longer have to worry about browser compatibility issues.
(7), Plug-in extension development
JQuery has a wealth of third-party plug-ins, such as: tree menu, date control, picture switching plug-in, pop-up window, etc. The components on the basic front-end page have corresponding plug-ins, and the effects made with JQuery plug-ins are very dazzling, and you can rewrite and encapsulate the plug-ins according to your own needs, which is simple and practical.
(8), strong scalability
JQuery provides an extension interface: JQuery.extend(object)
, which can be named in JQuery Add new functions in space. All JQuery plug-ins are developed based on this extension interface.
Recommended related video tutorials: jQuery Tutorial (Video)
The above is the detailed content of What are the characteristics of jquery. For more information, please follow other related articles on the PHP Chinese website!