jQuery 1.11 and 2.1 Released
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
- #14036: ajaxLocation Includes HTTP Basic Authentication Info
- #14356: Remove string indexing used in AJAX
- #14379: Issue with xhr.js
Attributes
Build
- #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’
Core
- #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
Css
- #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
Data
- #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)
Effects
Event
- #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
Manipulation
Misc
Selector
- #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
Support
- #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
jQuery 1.11
Ajax
- #13240: IE8 Doesn’t support HTTP PATCH method
- #14475: Local Ajax requests don’t work in IE 11 (ActiveXObject checking in jQuery fails)
Attributes
Build
Core
Effects
Support
jQuery 2.1
Ajax
Build
- #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
Wow, nice work, you guys are sure going through these releases fast
Congratulations on the release!
Nice to see jQuery landing in NPM.
:D FACT !! “If you want to know more, we’ve hidden the details in the README file where nobody ever looks.”
Hey guys great work on this! Looking forward to upgrading asap. Just a note, bower doesn’t have 1.11 yet it seems:
$ bower info jquery#1.11.0
bower not-cached git://github.com/components/jquery.git#1.11.0
bower resolve git://github.com/components/jquery.git#1.11.0
bower ENORESTARGET No tag found that was able to satisfy 1.11.0
Additional error details:
Available versions: 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.2, 1.5.1, 1.5.0, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.6, 1.2.3
I was just looking at the Bower situation, and it looks like we need to transition to the new, “official” listing of jquery on Bower, which points to their real git repo rather than a shim.
So, I’m wondering if that’s really true, and if it is, how we make the transition.
components guys might/should be able to push a tag in the interim.
https://github.com/components/jquery/issues/40
Awesome!
Microsoft should re-design IE and provide a force update to its customers about new IE.
BTW, nice work.. :)
Awesome work, guys.
I tested it a bit and, since I found nothing wrong, I put it in production on one of my websites.
Great Job!
Wonderful. Thank you for so many bug fixes. Looking forward to playing with the new node-specific support, too.
BTW: might want to update your site footer — the Quick Access bit is still pointing at 1.10.2 URLs.
Thanks for this new release, we continue using jQuery massively at our projects and with great pleasure!
Alex – Unihost Brasil
Nice piece of work. I updated all my 6 forum with the new jquery version. You are amazing, guys! Correcting bugs from IE 6? That’s why I trust so much in this library!
Great work, great stability. Pure quality. Thank you.
This new release has been anticipated for quite some time, glad to see it’s release! So far, we’ve had no trouble whatsoever. Wonderful work gents.
Yours Truly,
A long time jQuery dev firm
Woah, woah, woah. Hold the phone.
jQuery has a README file?!
Great work.
Great Work guys!!!!!!!!!!!!!!!!!!! keep it up.