How to Select jQuery version 1.x? 2. x? 3. x ?, Jquery1.x

Source: Internet
Author: User

How to Select jQuery version 1.x? 2. x? 3. x ?, Jquery1.x

Preface

When you select a version, the general principle is that the newer the better, but in fact, the jQuery version is constantly improving and developing, and the latest version is the highest technology level at that time, it is also the most advanced technology concept. It is worth thinking about how to select the jQuery version. Let's take a look at the details below.

Currently, jQuery has three major versions:

1. x: compatible with ie678, which is the most widely used. It only performs BUG maintenance and does not add any new features. Therefore, for general projects, you can use version 1.12.4 (December 4, May 20, 2016)

2. x: This product is not compatible with ie678 and is rarely used. It is only officially used for BUG maintenance and features are not added. If you do not consider compatibility with earlier versions of browsers, you can use 2.x. Final Version: 2.2.4 (January 1, May 20, 2016)

3. x: not compatible with ie678. Only the latest browser is supported. Unless otherwise specified, version 3.x is generally not used. Many old jQuery plug-ins do not support this version. Currently, this version is officially updated and maintained.

In 1.x versions, there are many subdivided versions, and the functions of each version may vary. Most of the tutorials on the Internet are in 1.x.

Official jquery Manual: http://api.jquery.com/

Maintaining ie678 is a headache. In general, we will load an additional css and js for separate processing. Fortunately, the number of users who use these browsers is gradually decreasing, and computer users have been gradually replaced by mobile users. If there are no special requirements, they generally choose to give up support for ie678.

Official Instructions on browser support:


How do I select the jQuery version?

Status quo

For the moment, the market share occupied by Internet Explorer in China is still relatively large, and it is unrealistic to directly exceed 2. x. The following is a piece of data from the Net Market Share. It can be seen that although the use of IE browser has declined, it still occupies half of the proportion. In view of the various versions of IE browser, IE 8.0 shares a relatively large market compared with other versions.


Market Share of various browsers


Market Share of various browser versions

Who is jQuery 2.x suitable?

Since jQuery 2.x does not support old browsers, why should we develop this version?

It should be noted that this version is mainly used in some advanced JS environments, that is, browsers with newer versions. These JavaScript codes have little to do with old IE, while most of jQuery 1.x code is compatible with old browsers, which increases the running burden and affects the running efficiency.

The following are official recommendations:

Recommended JS Environment

Download and use jQuery

Here we recommend a can download jQuery each version of the page: http://www.bkjia.com/zt/jquerydown.htm

Below are some common jquery static resource libraries that can be referenced directly on the page.

Jquery for Sina cdn:

<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.4.4/jquery.min.js"></script><script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.12.4/jquery-1.12.4.min.js"></script><script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/2.2.4/jquery-2.2.4.min.js"></script><script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/3.1.0/jquery-3.1.0.min.js"></script>

Baidu CDN:

<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.11.3/jquery.min.js"></script><script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.7.2/jquery.min.js"></script>

Note:For https websites, you can directly change http to https or remove http :.

Summary

The above is all the content of this article. I hope the content of this article will help you in your study or work. If you have any questions, please leave a message, thank you for your support.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.