jQuery 1.11 and 2.1 Released

Posted on by

Here in the eastern part of the United States, we’re huddling in subzero temperatures and dealing with the aftermath of a snowstorm. Still, there’s nothing to brighten our moods like the pristine beauty of a freshly fallen release–no, make that TWO releases. jQuery 1.11.0 and 2.1.0 are ready to keep you warm on these dark winter nights.

You can get the files off our CDN as always, and either use them directly or download them to your own server. Our download page has all the files and information you need, including pointers to the other CDNs that carry the files. Just give those folks a few days to update!

For those of you not following along for a while, both the 1.x and 2.x branches of jQuery support all recent modern browsers and have the same API. The 1.x branch, this time 1.11.0, adds support for the older versions of Internet Explorer (IE6, 7, and 8). The 2.x branch, today played by 2.1.0, adds support for non-traditional web environments like node.js and browser plugins for Chrome and Firefox.

jQuery went through a major house-cleaning with the 1.9 release that removed some features. If you haven’t yet moved from an earlier version, see the jQuery 1.9 Upgrade Guide and let the jQuery Migrate plugin do all the heavy lifting for you.

What’s New?

You may be wondering what great new things await you in these releases. Perhaps you’re fearing that they hold a bunch of breaking changes. You just know the project lead will suggest updating things right now. There goes your whole damn week and that trip to Florida. Well fear not! We’ve fixed quite a few bugs, but the other features and changes are mainly organizational ones that don’t affect the behavior of APIs. Your code shouldn’t break, it should just run a little faster. Here are the highlights:

Fewer forced layouts: In this release we declared war on places where we might inadvertently force the browser to do a time-consuming layout. We found a few and eliminated one in particular that could occur when changing class names. This can result in a big performance boost for some pages.

Granular custom builds: Our modularity is now defined by AMD, and it is easier to build small subsets of the library when space is at a premium. If you want to know more, we’ve hidden the details in the README file where nobody ever looks.

Lower startup overhead: The new modularity and avoidance of forced layouts led us to refactor our feature detects so that they run the first time they’re needed. If you never call the API needing that feature detect, you never run that code. Previously we ran all feature detects when the page loaded, that led to delays that were generally small, but added up–especially on mobile platforms.

Published on npm: Our releases will now be published on npm so that you can use them with node or browserify. Both the 1.x and 2.x branches are available on npm, but remember that only the 2.x branch is supported to run in node.

Published on Bower: We’re now using Bower for our internal dependency management including Sizzle, so you’ll see jQuery releases on Bower as soon as they’re available.

Some people have asked about supporting other package managers inside the jQuery library, but we’ve decided to only support the two that we use internally at the moment. There are more than a dozen package/dependency managers, it would be handy if they all could agree on a single format for projects to publish information. We don’t want the package manager’s overhead to be pushed off to individual projects like jQuery.

Although the glamor always seems to be in the new stuff, we don’t like to ignore the bugs and inconveniences that people have run across while using the last version. We worked hard to knock down our bug list and tackled quite a few of them. We even fixed a bug that only occurs in IE6, better late than never!

Sourcemap changes

This release does not contain the sourcemap comment in the minified file. Sourcemaps have proven to be a very problematic and puzzling thing to developers, spawning hundreds of confused developers on forums like StackOverflow and causing some to think jQuery itself was broken.

We’ll still be generating and distributing sourcemaps, but you will need to add the appropriate sourcemap comment at the end of the minified file if the browser does not support manually associating map files (currently, none do). If you generate your own jQuery file using the custom build process, the sourcemap comment will be present in the minified file and the map is generated; you can either leave it in and use sourcemaps or edit it out and ignore the map file entirely.

We hope to bring back and improve sourcemap support in the future, but at the moment neither the design nor the implementation seem suited for situations like jQuery’s, where there are widely distributed files on CDNs. We’d like sourcemaps (and browsers supporting them) to gracefully handle situations like file renaming or missing files. See our bug ticket for more information.

Acknowledgements

This release would not have happened without the hard work of many people. Thanks to everyone who reported bugs, tried out the prerelease files, or provided constructive criticism. Particular thanks are due to Alex Robbin, Amey Sakhadeo, Anthony Ryan, Aurelio DeRosa, Chris Antaki, Chris Price, Christopher Jones, Corey Frang, Daniel Herman, Domenic Denicola, Dominik D. Geyer, Forbes Lindesay, George Kats, Guy Bedford, Ilya Kantor, Jakob Stoeck, Jeremy Dunck, John Paul, Julian Aubourg, Jörn Zaefferer, Lihan Li, Marian Sollmann, Markus Staab, Marlon Landaverde, Michał Gołębiowski, Mike Sidorov, Oleg Gaidarenko, Richard Gibson, Rick Waldron, Ronny Springer, Scott González, Sindre Sorhus, T.J. Crowder, Terry Jones, Timmy Willison, and Timo Tijhof. Colin Snover’s commentary in #jquery-dev is also a source of rare humor for the team.

Changelog

jQuery 1.11 and 2.1 (common to both)

Ajax

Attributes

Build

Core

Css

Data

Effects

Event

Manipulation

Misc

Selector

Support

jQuery 1.11

Ajax

Attributes

Build

Core

Effects

Support

jQuery 2.1

Ajax

Build

Core

Event