Home  >  Article  >  Web Front-end  >  What are the differences between the three major versions of jquery?

What are the differences between the three major versions of jquery?

青灯夜游
青灯夜游Original
2020-12-04 10:07:423254browse

Difference: The jquery1.x version is compatible with ie678, and the official only does bug maintenance, and no new functions will be added; the jquery2.x version is not compatible with ie678, the official only does bug maintenance, and no new functions will be added; jquery3.x The version is not compatible with ie678 and only supports the latest browsers. It is an official version that is mainly updated and maintained.

What are the differences between the three major versions of jquery?

Related recommendations: " Programming Video Course"

jQuery is a fast and concise JavaScript framework. The purpose of jQuery's design is "write less, do more", which means writing less code and doing more things.

Currently jQuery has three versions: 1.x, 2.x, and 3.x, which can be viewed on the jQuery official website (http://jquery.com/).

Differences between the three major series of 1.x, 2.x, and 3.x

1, Comparison of IE support

(1) Situation analysis

1.x: supports ie6, ie7, ie8

2.x, 3.x: does not support ie6, ie7, ie8

(2) Selection suggestions

If you need to be compatible with ie678: you can only choose 1.x

If you don’t need to be compatible with ie678: you can choose 2.x, 3.x. Because most of the code in 1.x is compatible with old browsers, this increases the operating burden and affects operating efficiency.

2. Comparison of plug-in support

(1) Situation analysis

Because jQuery versions are not backward compatible, resulting in Plug-ins developed based on jQuery will have compatibility issues. That is to say, when a new version of jQuery is launched, the original plug-in may not work properly, and the plug-in author needs to re-develop a new version.

(2) Selection suggestions

In order to ensure better compatibility with various plug-ins, you can choose version 1.x.

3, Comparison of new features

(1) Compared with 1.x, 2.x does not add any new features, mainly because it removes the support for ie678 and improves Improved performance and reduced physical examination.

(2) Compared with the previous version, 3.x has added many new features and also changed some previous features

Summary

##1.x is compatible with ie678, the most widely used one, and the official only does bug maintenance. Functions will no longer be added. Therefore, for general projects, you can use version 1.x. The final version: 1.12.42.x is not compatible with ie678 and is rarely used by people. The official only does bug maintenance and no new functions will be added. If browsers with lower compatibility versions are not considered, you can use 2.x. The final version: 2.2.43.x is not compatible with ie678 and only supports the latest browsing. device. Unless there are special requirements, version 3.x is generally not used. Many old jQuery plug-ins do not support this version. This version is currently the official main update and maintenance version.
Version Description
To read more related articles, please visit

PHP Chinese website! !

The above is the detailed content of What are the differences between the three major versions of jquery?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Can react introduce css?Next article:Can react introduce css?