BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Synchronized jQuery 1.10 and 2.0.1 Releases

Synchronized jQuery 1.10 and 2.0.1 Releases

Leia em Português

This item in japanese

jQuery 1.10 and 2.0.1 has been released. The primary goal of this release is to synchronize the features of the 1.x and 2.x lines. The jQuery 2.x line has the same API as the 1.x line, but does not support Internet Explorer 6, 7, or 8. If you are planning to upgrade and you currently using jQuery 1.8 and below, please make sure you read the jQuery 1.9 Upgrade Guide due to major changes to the API. If you are already using jQuery 1.9 or jQuery 2.0, the latest versions should be a drop-in replacement. jQuery is provided under the MIT license.

Here are the highlights of this release.

Relaxed HTML Parsing
You can once again have leading spaces or newlines before tags in $(html). Remember that it's strongly advised that $.parseHTML() be used to parse HTML from external sources.
Increased Modularity
The .wrap(), .wrapAll(), .wrapInner() and .unwrap() methods are now optional, so you can create custom builds that excludes these methods. If your code is using the newer .on() event methods introduced in jQuery 1.7, you can also exclude .bind() and .delegate(). Please note that the releases on the jQuery, Google, and Microsoft CDNs continue to include all methods for maximum compatibility.
IE9 Focus of Death Fix
If a page inside an iframe attempts to focus an element, or even tries to read document.activeElement before the page is ready, it causes an error in IE9. The internal work around to this issue it to use native DOM .focus(). .
Cordova Fix
In jQuery 2.0.1, the Cordova deviceready event doesn't properly set an event target. This has been confirmed on the iPhone and Android with Cordova 2.5.0. The work around is to set the target to the document.

The complete jQuery 1.10 and 2.0.1 changelog can be found at the end of the release blog post.

jQuery 1.10 and 2.0.1 are now available on the jQuery CDN. The Google CDN and the Microsoft CDN are still hosting the previous versions as of this writing, so please check in a few days.

Rate this Article

Adoption
Style

BT