喜大普奔!jQuery发布 3.0 最终版


Posted in Javascript onJune 12, 2016

jQuery 3.0 最终版发布了。jQuery 3.0将是jQuery的未来。但如果你需要IE6-8支持,您可以继续使用最新版本1.12。

为了帮助用户升级,jQuery 发布了全新的3.0升级指南,以及 jQuery Migrate 3.0 插件将帮助您识别代码中的兼容性问题。

您可以从jQuery CDN获取文件,或者直接访问链接:

  • https://code.jquery.com/jquery-3.0.0.js

  • https://code.jquery.com/jquery-3.0.0.min.js

您也可以从以下npm获得更新:

npm install jquery@3.0.0

此外,jQuery Migrate 3.0 也更新了。地址:

  • https://code.jquery.com/jquery-migrate-3.0.0.js

  • https://code.jquery.com/jquery-migrate-3.0.0.min.js

npm install jquery-migrate@3.0.0

更新日志:

Ajax

  • Golf away 21 bytes (eaa3e9f)

  • Preserve URL hash on requests (#1732, e077ffb)

  • Execute jQuery#load callback with correct context (#3035, 5d20a3c)

  • Ensure ajaxSettings.traditional is still honored (#3023, df2051c)

  • Remove unnecessary use of jQuery.trim (0bd98b1)

Attributes

  • Avoid infinite recursion on non-lowercase attribute getters (#3133, e06fda6)

  • Add a support comment & fix a link @ tabIndex hook (9cb89bf)

  • Strip/collapse whitespace for set values on selects (#2978, 7052698)

  • Remove redundant parent check (b43a368)

  • Fix setting selected on an option in IE<=11 (#2732, 780cac8)

CSS

  • Don't workaround the IE 11 iframe-in-fullscreen sizing issues (#3041, ff1a082)

  • Toggle detached elements as visible unless they have display: none (#2863, 755e7cc)

  • Make sure elem.ownerDocument.defaultView is not null (#2866, 35c3148)

  • Add animation-iteration-count to cssNumber (#2792, df822ca)

  • Restore cascade-override behavior in .show (#2654, #2308, dba93f7)

  • Stop Firefox from treating disconnected elements as cascade-hidden (#2833, fe05cf3)

Core

  • Implement ready without Deferred (#1778, #1823, 5cbb234)

  • Improve isNumeric logic and test coverage (#2780, 7103d8e)

  • Set the base href of the context in parseHTML (#2965, 10fc590)

  • Simplify isPlainObject (#2986, e0d3bfa)

  • Add test for `jQuery.isPlainObject(localStorage)` (ce6c83f)

  • Do not expose second argument of the `jQuery.globalEval` (6680c1b)

  • Deprecate jQuery.parseJSON (#2800, 93a8fa6)

Deferred

  • Separate the two paths in jQuery.when (#3029, 356a3bc)

  • Provide explicit undefined context for jQuery.when raw casts (#3082, 7f1e593)

  • Remove default callback context (#3060, 7608437)

  • Warn on exceptions that are likely programming errors (#2736, 36a7cf9)

  • Propagate progress correctly from unwrapped promises (#3062, d5dae25)

  • Make jQuery.when synchronous when possible (#3100, de71e97)

  • Remove undocumented progress notifications in $.when (#2710, bdf1b8f)

  • Give better stack diagnostics on exceptions (07c11c0)

Dimensions

  • Add tests for negative borders & paddings (f00dd0f)

Docs

  • Fix various spelling errors (aae4411)

  • Update support comments related to IE (693f1b5)

  • Fix an incorrect comment in the attributes module (5430c54)

  • Updated links to https where they are supported. (b0b280c)

  • Update support comments to follow the new syntax (6072d15)

  • Use https where possible (1de8346)

  • Use HTTPS URLs for jsfiddle & jsbin (63a303f)

  • Add FAQ to reduce noise in issues (dbdc4b7)

  • Add a note about loading source with AMD (#2714, e0c25ab)

  • Add note about code organization with AMD (#2750, dbc4608)

  • Reference new feature guidelines and API tenets (#2320, 6054139)

Effects

  • Remove width/height exception for oldIE (#2488, e04e246)

  • Add tests for using jQuery.speed directly (#2716, cb80b42)

Event

  • Allow constructing a jQuery.Event without a target (#3139, 2df590e)

  • Add touch event properties, eliminates need for a plugin (#3104, f595808)

  • Add the most commonly used pointer event properties (7d21f02)

  • Remove fixHooks, propHooks; switch to ES5 getter with addProp (#3103, #1746, e61fccb)

  • Make event dispatch optimizable by JavaScript engines (9f268ca)

  • Evaluate delegate selectors at add time (#3071, 7fd36ea)

  • Cover invalid delegation selector edge cases (e8825a5)

  • Fix chaining .on() with null handlers (#2846, 17f0e26)

  • Remove pageX/pageY fill for event object (#3092, 931f45f)

Events

  • Don't execute native stop(Immediate)Propagation from simulation (#3111, 94efb79)

Manipulation

  • Bring tagname regexes up to spec (#2005, fb9472c)

Offset

  • Resolve strict mode ClientRect “no setter” exception (3befe59)

Selector

  • filters -> pseudos (#2073, 0402963)

  • Update Sizzle to 2.3.0 (5c4be05)

  • Add jQuery.escapeSelector (#1761, 25068bf)

Serialize

  • Treat literal and function-returned null/undefined the same (#3005, 9fdbdd3)

  • Reduce size (91850ec)

Support

  • Improve support properties computation (#3018, 44cb97e)

Tests

  • Take Safari 9.1 into account (234a2d8)

  • Limit selection to #qunit-fixture in attributes.js (ddb2c06)

  • Set Edge's expected support for clearClone  to true (28f0329)

  • Fix Deferred tests in Android 5.0's stock Chrome browser & Yandex.Browser (5c01cb1)

  • Add additional test for jQuery.isPlainObject (728ea2f)

  • Build: update QUnit and fix incorrect test (b97c8d3)

  • Fix manipulation tests in Android 4.4 (0b0d4c6)

  • Remove side-effects of one attributes test (f9ea869)

  • Account for new offset tests (f52fa81)

  • Make iframe tests wait after checking isReady (08d73d7)

  • Refactor testIframe() to make it DRYer and more consistent (e5ffcb0)

  • Weaken sync-assumption from jQuery.when to jQuery.ready.then (f496182)

  • Test element position outside view (#2909, a2f63ff)

  • Make the regex catching Safari 9.0/9.1 more resilient (7f2ebd2)

Traversing

  • .not/.filter consistency with non-elements (#2808, 0e2f8f9)

  • Never let .closest() match positional selectors (#2796, a268f52)

  • Restore jQuery push behavior in .find (#2370, 4d3050b)

详情:jQuery 3.0 Final Released!

Javascript 相关文章推荐
去除链接虚线全面分析总结
Aug 15 Javascript
javascript document.referrer 用法
Apr 30 Javascript
jQuery Tools tab(幻灯片)
Jul 14 Javascript
jquery ajax请求方式与提示用户正在处理请稍等
Sep 01 Javascript
浅谈JavaScript前端开发的MVC结构与MVVM结构
Jun 03 Javascript
微信小程序 scroll-view隐藏滚动条详解
Jan 16 Javascript
canvas实现图像放大镜
Feb 06 Javascript
使用jQuery操作DOM的方法小结
Feb 27 Javascript
JS实现图片点击后出现模态框效果
May 03 Javascript
使用vue构建一个上传图片表单
Jul 04 Javascript
微信小程序实现的绘制table表格功能示例
Apr 26 Javascript
jQuery Raty星级评分插件使用方法实例分析
Nov 25 jQuery
浅谈JavaScript变量的自动转换和语句
Jun 12 #Javascript
浅谈jquery点击label触发2次的问题
Jun 12 #Javascript
Bootstrap学习笔记之js组件(4)
Jun 12 #Javascript
JSP基于Bootstrap分页显示实例解析
Jun 12 #Javascript
JavaScript手机振动API
Jun 11 #Javascript
JavaScript地理位置信息API
Jun 11 #Javascript
jQuery自定义数值抽奖活动代码
Jun 11 #Javascript
You might like
解析php入库和出库
2013/06/25 PHP
ThinkPHP公共配置文件与各自项目中配置文件组合的方法
2014/11/24 PHP
PHP中include()与require()的区别说明
2017/02/14 PHP
CSDN轮换广告图片轮换效果
2007/03/27 Javascript
用javascript控制iframe滚动的代码
2007/04/10 Javascript
Jquery搜索父元素操作方法
2015/02/10 Javascript
js实现的简单radio背景颜色选择器代码
2015/08/18 Javascript
JS判断是否长按某一键的方法
2016/03/02 Javascript
浅析ES6的八进制与二进制整数字面量
2016/08/30 Javascript
在JavaScript中调用Java类和接口的方法
2016/09/07 Javascript
Javascript农历与公历相互转换的简单实例
2016/10/09 Javascript
jQuery实现jQuery-form.js实现异步上传文件
2017/04/28 jQuery
理解nodejs的stream和pipe机制的原理和实现
2017/08/12 NodeJs
用Object.prototype.toString.call(obj)检测对象类型原因分析
2018/10/11 Javascript
javascript实现贪吃蛇游戏(娱乐版)
2020/08/17 Javascript
web.py在SAE中的Session问题解决方法(使用mysql存储)
2015/06/24 Python
Python基于正则表达式实现检查文件内容的方法【文件检索】
2017/08/30 Python
用python统计代码行的示例(包括空行和注释)
2018/07/24 Python
python ftplib模块使用代码实例
2019/12/31 Python
Pytorch 神经网络—自定义数据集上实现教程
2020/01/07 Python
Django CSRF认证的几种解决方案
2020/03/03 Python
python多维数组分位数的求取方式
2020/03/03 Python
解决windows上安装tensorflow时报错,“DLL load failed: 找不到指定的模块”的问题
2020/05/20 Python
Python新手学习raise用法
2020/06/03 Python
Python如何定义有可选参数的元类
2020/07/31 Python
如何获得EntityManager
2014/02/09 面试题
应届毕业生求职信范文
2013/12/18 职场文书
实习鉴定范文
2013/12/19 职场文书
财务工作者先进事迹材料
2014/01/17 职场文书
中式结婚主持词
2014/03/14 职场文书
海飞丝的广告词
2014/03/20 职场文书
社区志愿者活动总结
2014/06/26 职场文书
销售员态度差检讨书
2014/10/26 职场文书
党的群众路线教育实践活动个人整改措施落实情况
2014/11/04 职场文书
2014年物流工作总结
2014/11/25 职场文书
MySQL 数据库范式化设计理论
2022/04/22 MySQL