I recently stumbled upon a page webchart.js design using jQuery version 2, and I am using jQuery version 1.

For the code to work see to it to use now the latest version, then I checked jQuery core support and they have jQuery 3 released.

我现在正在考虑使用版本3,但我正在寻找版本3是否存在兼容性问题,它可能只在特定设备上使用.

推荐答案

Major Versions

Version 1.0: First stable release.
Version 2.0: Dropped IE 6–8 support for performance improvements and reduction in filesize
Version 3.0: Promises/A+ support for Deferreds, $.ajax and $.when, .data() HTML5-compatible

All Versions

+----------------+--------------------+----------------------------+----------------+---------------------------------------------------------------------------------------+
| Version Number |    Release Date    |       Latest Update        | Size Prod (KB) |                                   Additional Notes                                    |
+----------------+--------------------+----------------------------+----------------+---------------------------------------------------------------------------------------+
| 1.0            | August 26, 2006    |                            |                | First stable release                                                                  |
| 1.1            | January 14, 2007   |                            |                |                                                                                       |
| 1.2            | September 10, 2007 | 1.2.6                      | 54             |                                                                                       |
| 1.3            | January 14, 2009   | 1.3.2                      | 55.9           | Sizzle Selector Engine introduced into core                                           |
| 1.4            | January 14, 2010   | 1.4.4                      | 76             |                                                                                       |
| 1.5            | January 31, 2011   | 1.5.2                      | 83             | Deferred callback management, ajax module rewrite                                     |
| 1.6            | May 3, 2011        | 1.6.4                      | 89             | Significant performance improvements to the attr() and val() functions                |
| 1.7            | November 3, 2011   | 1.7.2 (March 21, 2012)     | 92             | New Event APIs: .on() and .off(), while the old APIs are still supported.             |
| 1.8            | August 9, 2012     | 1.8.3 (November 13, 2012)  | 91.4           | Sizzle Selector Engine rewritten, improved animations and $(html, props) flexibility. |
| 1.9            | January 15, 2013   | 1.9.1 (February 4, 2013)   | 90             | Removal of deprecated interfaces and code cleanup                                     |
| 1.10           | May 24, 2013       | 1.10.2 (July 3, 2013)      | 91             | Incorporated bug fixes and differences reported from both the 1.9 and 2.0 beta cycles |
| 1.11           | January 24, 2014   | 1.11.3 (April 28, 2015)    | 95.9           |                                                                                       |
| 1.12           | January 8, 2016    | 1.12.4 (May 20, 2016)      | 95             |                                                                                       |
| 2.0            | April 18, 2013     | 2.0.3 (July 3, 2013)       | 81.1           | Dropped IE 6–8 support for performance improvements and reduction in filesize         |
| 2.1            | January 24, 2014   | 2.1.4 (April 28, 2015)     | 82.4           |                                                                                       |
| 2.2            | January 8, 2016    | 2.2.4 (May 20, 2016)       | 85.6           |                                                                                       |
| 3.0            | June 9, 2016       | 3.0.0 (June 9, 2016)       | 86.3           | Promises/A+ support for Deferreds, $.ajax and $.when, .data() HTML5-compatible        |
| 3.1            | July 7, 2016       | 3.1.1 (September 23, 2016) | 86.3           | jQuery.readyException added, ready handler errors are now not silenced                |
| 3.2            | March 16, 2017     | 3.2.1 (March 20, 2017)     | 84.6           | Hotfixes for regressions that were introduced in the 3.2.0                            |
| 3.3            | January 19, 2018   | 3.3.1 (January 20, 2018)   | 84.8           | Deprecation of old function calls, functions that accept classes now support them     |
|                |                    |                            |                | defined in an array                                                                   |
| 3.4            | April 10, 2019     | 3.4.1 (May 1, 2019)        | 86.1           | Performance improvements, nonce and nomodule support, fixes for radio elements, a     |
|                |                    |                            |                | minor security fix                                                                    |
| 3.5            | April 10, 2020     | 3.5.1 (May 4, 2020)        | 87.4           | Security fixes, .even() & .odd() methods, jQuery.trim deprecated                      |
| 3.6            | March 2, 2021      | 3.6.0 (March 2, 2021)      | 90.0           | Bug fixes, return JSON when there is a JSONP error                                    |
+----------------+--------------------+----------------------------+----------------+---------------------------------------------------------------------------------------+

Reference: https://en.wikipedia.org/wiki/JQuery#Release_history

Detailed Explanation on Major Versions

Version 1.0 was the first stable release of jQuery. This release supports older web browsers that aren't even supported by their respective developers any longer. If you expect a large amount of visitors with older web browsers, this would definitely be the version to go for.

Versions 2.0 dropped support for Internet Explorer 6-8 to increase jQuery's overall performance and reduce the library's filesize. In simple words: Version 2.0 is faster and smaller in filesize than version 1.0, but it no longer supports older web browsers. Since Microsoft dropped the support for Windows XP, it's reasonably safe to assume that your visitors will be using a browser compatibile with version 2.0 unless you know beforehand this won't be the case (see version 1.0).

随着版本3.0的发布,版本1.11.1和2.1.1都将升级到jQuery Compat 3.0和jQuery 3.0.jQuery Compat 3.0仍将支持Internet Explorer 8等较旧的浏览器,而常规版本3.0将只支持evergreen浏览器(特定浏览器的当前和以前版本).

随着版本3.0的发布,没有理由坚持使用版本1.0或2.0.来自jQuery官方博客的几点注释:

  • 如果您需要支持包括IE8在内的各种浏览器,
  • 如果您的网站仅为长荣的领先浏览器而构建,或者
  • 除非我们另行宣布,否则两个包将包含相同的内容

Reference: https://blog.jquery.com/2014/10/29/jquery-3-0-the-next-generations/

Jquery相关问答推荐

为什么如果使用转换规模,juserui可拖动遏制不起作用

在shiny 的datatable列中启用智能搜索

:eq Jquery,我似乎无法显示第一个之后的元素

使用 JQuery 在 span 标签中用逗号分隔页面上的文本

5 秒后关闭 jQuery 弹出模式

formData.append 来自不同输入文件的两个文件

如何在jQuery中判断粘贴剪贴板中字母输入的增加/减少

将 jquery 元素转换为 html 元素

jQuery在点击函数后获取
  • 元素的id/value
  • 如何判断是否有任何 JavaScript 事件侦听器/处理程序附加到元素/文档?

    如何从 jQuery 中的父级中 Select 所有子级(任何级别)?

    jquery click 不适用于 ajax 生成的内容

    如何在 jQuery .each() 的每次迭代之间添加暂停?

    Javascript中的选定文本事件触发器

    $(document).ready(function(){});页面底部的 vs 脚本

    Bootstrap 4 文件输入

    在 jQuery 中 Select 后代元素的最快方法是什么?

    $(document).click() 在 iPhone 上无法正常工作. jQuery

    jQuery .val 更改不会更改输入值

    jquery在cookie中保存json数据对象