喜大普奔!jQuery发布 3.0 最终版
jQuery 3.0 最终版发布了。jQuery 3.0将是jQuery的未来。但如果你需要IE6-8支持,您可以继续使用最新版本1.12。
为了帮助用户升级,jQuery 发布了,以及 将帮助您识别代码中的兼容性问题。
您可以从jQuery CDN获取文件,或者直接访问链接:
您也可以从以下npm获得更新:
npm install jquery@3.0.0
此外,jQuery Migrate 3.0 也更新了。地址:
npm install jquery-migrate@3.0.0
更新日志:
Ajax
-
Golf away 21 bytes ()
-
Preserve URL hash on requests (, )
-
Execute jQuery#load callback with correct context (, )
-
Ensure ajaxSettings.traditional is still honored (, )
-
Remove unnecessary use of jQuery.trim ()
Attributes
-
Avoid infinite recursion on non-lowercase attribute getters (, )
-
Add a support comment & fix a link @ tabIndex hook ()
-
Strip/collapse whitespace for set values on selects (, )
-
Remove redundant parent check ()
-
Fix setting selected on an option in IE<=11 (, )
CSS
-
Don't workaround the IE 11 iframe-in-fullscreen sizing issues (, )
-
Toggle detached elements as visible unless they have display: none (, )
-
Make sure elem.ownerDocument.defaultView is not null (, )
-
Add animation-iteration-count to cssNumber (, )
-
Restore cascade-override behavior in .show (, , )
-
Stop Firefox from treating disconnected elements as cascade-hidden (, )
Core
-
Implement ready without Deferred (, , )
-
Improve isNumeric logic and test coverage (, )
-
Set the base href of the context in parseHTML (, )
-
Simplify isPlainObject (, )
-
Add test for `jQuery.isPlainObject(localStorage)` ()
-
Do not expose second argument of the `jQuery.globalEval` ()
-
Deprecate jQuery.parseJSON (, )
Deferred
-
Separate the two paths in jQuery.when (, )
-
Provide explicit undefined context for jQuery.when raw casts (, )
-
Remove default callback context (, )
-
Warn on exceptions that are likely programming errors (, )
-
Propagate progress correctly from unwrapped promises (, )
-
Make jQuery.when synchronous when possible (, )
-
Remove undocumented progress notifications in $.when (, )
-
Give better stack diagnostics on exceptions ()
Dimensions
-
Add tests for negative borders & paddings ()
Docs
-
Fix various spelling errors ()
-
Update support comments related to IE ()
-
Fix an incorrect comment in the attributes module ()
-
Updated links to https where they are supported. ()
-
Update support comments to follow the new syntax ()
-
Use https where possible ()
-
Use HTTPS URLs for jsfiddle & jsbin ()
-
Add FAQ to reduce noise in issues ()
-
Add a note about loading source with AMD (, )
-
Add note about code organization with AMD (, )
-
Reference new feature guidelines and API tenets (, )
Effects
-
Remove width/height exception for oldIE (, )
-
Add tests for using jQuery.speed directly (, )
Event
-
Allow constructing a jQuery.Event without a target (, )
-
Add touch event properties, eliminates need for a plugin (, )
-
Add the most commonly used pointer event properties ()
-
Remove fixHooks, propHooks; switch to ES5 getter with addProp (, , )
-
Make event dispatch optimizable by JavaScript engines ()
-
Evaluate delegate selectors at add time (, )
-
Cover invalid delegation selector edge cases ()
-
Fix chaining .on() with null handlers (, )
-
Remove pageX/pageY fill for event object (, )
Events
-
Don't execute native stop(Immediate)Propagation from simulation (, )
Manipulation
-
Bring tagname regexes up to spec (, )
Offset
-
Resolve strict mode ClientRect “no setter” exception ()
Selector
-
filters -> pseudos (, )
-
Update Sizzle to 2.3.0 ()
-
Add jQuery.escapeSelector (, )
Serialize
-
Treat literal and function-returned null/undefined the same (, )
-
Reduce size ()
Support
-
Improve support properties computation (, )
Tests
-
Take Safari 9.1 into account ()
-
Limit selection to #qunit-fixture in attributes.js ()
-
Set Edge's expected support for clearClone to true ()
-
Fix Deferred tests in Android 5.0's stock Chrome browser & Yandex.Browser ()
-
Add additional test for jQuery.isPlainObject ()
-
Build: update QUnit and fix incorrect test ()
-
Fix manipulation tests in Android 4.4 ()
-
Remove side-effects of one attributes test ()
-
Account for new offset tests ()
-
Make iframe tests wait after checking isReady ()
-
Refactor testIframe() to make it DRYer and more consistent ()
-
Weaken sync-assumption from jQuery.when to jQuery.ready.then ()
-
Test element position outside view (, )
-
Make the regex catching Safari 9.0/9.1 more resilient ()
Traversing
-
.not/.filter consistency with non-elements (, )
-
Never let .closest() match positional selectors (, )
-
Restore jQuery push behavior in .find (, )
详情: