January 24th, 2014
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.
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!
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.
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.
jQuery 1.11 and 2.1 (common to both)
- #14036: ajaxLocation Includes HTTP Basic Authentication Info
- #14356: Remove string indexing used in AJAX
- #14379: Issue with xhr.js
- #12757: Enforce style guide via build process
- #13983: Switch to //# for sourcemap directives
- #14016: Include a build option for customizing exports
- #14113: AMD-ify jQuery source
- #14118: Use bower to include Sizzle and QUnit (remove submodules)
- #14163: Make Deferreds/Callbacks/.ready() optional modules
- #14415: Remove sourcemap comment
- #14450: Remove CommonJS+AMD syntax from source
- #14451: Add bower and npm registrations to release script
- #14504: Build: Upgrade to grunt-contrib-jshint 0.7.1 and squash subtasks
- #14615: Manage bower dependencies with grunt-bowercopy
- #14702: Problem with npm package for jquery ‘latest’
- #14164: Reduce forced layout reflows in init or methods
- #14492: parseJSON incorrectly accepts comma expressions
- #14548: npm jQuery does not have a main module
- #14549: npm jQuery does not expose the jQuery function, but instead a wierd factory
- #14645: Remove global exposure for CommonJS environments with a document
- #14150: IE9-10 curCSS => “Interface not supported” in for popups (and probably frames)
- #14394: style=”x: y !important;” doesn’t get changed when calling el.css(x, z) in Chrome and Safari but it works in Firefox
- #14101: Version 1.10 .data() differs from 1.8 when getting data from non-existent object
- #14459: data-* attribute parsing bypasses jQuery.parseJSON (inconsistent with 1.x)
- #13993: .triggerHandler doesn’t return value from handler for DOM0 events
- #14180: focusin/out special events don’t work cross-window
- #14282: Don’t call getPreventDefault() if there is a defaultPrevented property
- #14142: Wrong number of elements returned in XML document with numeric IDs in Safari
- #14351: Exception thrown when running `find` in a non-attached DOM node
- #14381: .add() throws “no such interface” in IE when adding nodes from another window
- #14535: Selection fails in IE11 when the last context is a no-longer-present iframe document
- #14584: Attribute Ends With case-insensitive in some IE8
- #10814: make support as lazy as possible with closure in mind
- #14084: elem.css(‘width’) provides incorrect output with `box-sizing: border-box` if run before document ready
- #14401: Error when loading a page with application/xhtml+xml
- #14496: jQuery 2.1.0-beta1 fails to initialize in a XHTML page
- #13240: IE8 Doesn’t support HTTP PATCH method
- #14475: Local Ajax requests don’t work in IE 11 (ActiveXObject checking in jQuery fails)
- #14074: jQuery 1 throws an error on window ready when there is an element in the DOM with the id ‘nodeName’
- #13119: Make jQuery releases available via npm
- #13768: Error trying to load jQuery from node.js
- #14340: Remove oldIE code from support tests on master