jQuery 1.10.0 and 2.0.1 Released
It’s a wonderful day for a software release. Such a wonderful day, we’re doing two software releases! Today it’s jQuery 1.10.0 and jQuery 2.0.1 making their debut — five years to the day after jQuery 1.2.6 was released.
A simultaneous release isn’t always easy, but it can be very satisfying. The team is certainly satisfied with this duo of deliveries; those of you who have already upgraded to the 1.9/2.0 level should have an easy time with these versions. If you’re upgrading older code, the advice in the jQuery 1.9 upgrade guide still applies to these two releases as well. Also don’t forget that jQuery. 2.0 doesn’t support IE 6, 7, or 8 since we’re leaving that work to the 1.x branch. If you need some help updating or keeping older pre-1.9 jQuery code going, don’t forget about the jQuery Migrate plugin.
As always, the latest versions are all available on our download page.
What’s new? Our main goal with these two releases is to synchronize the features and behavior of the 1.x and 2.x lines, as we pledged a year ago when jQuery 2.0 was announced. Going forward, we’ll try to keep the two in sync so that 1.11 and 2.1 are feature-equivalent for example. We don’t anticipate you’ll find any of these to be disruptive changes. Here are a few highlights:
Relaxed HTML parsing: You can once again have leading spaces or newlines before tags in $(htmlString)
. We still strongly advise that you use $.parseHTML()
when parsing HTML obtained from external sources, and may be making further changes to HTML parsing in the future.
Increased modularity: In either version, you now can do a custom build that excludes the .wrap()
, .wrapAll()
, .wrapInner()
and .unwrap()
methods. If all your code is using the newer .on()
event methods introduced in jQuery 1.7, you can also exclude .bind()
and .delegate()
as well. The builds available on the jQuery, Google, and Microsoft CDNs continue to include all methods to provide maximum compatibility.
No more IE9 focus of death: 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. We now work around this issue.
Cordova bug fix in 2.0.1: The Cordova deviceready
event doesn’t properly set an event target, so we work around the problem by setting the target to document
.
Many thanks to the people who contributed work to jQuery 1.10.0 or jQuery 2.0.1: Brandon Johnson, Chris Talkington, Dmitry Gusev, James Burke, Jason Bedard, Julian Aubourg, Kyle Robinson Young, Mark Raddatz, Michał Gołębiowski, Nguyen Phuc Lam, Oleg Gaidarenko, Renato Oliveira dos Santos, Richard Gibson, Rick Waldron, Scott González, Timmy Willison, Timo Tijhof, and Tom H Fuertes.
jQuery 1.10.0 Changelog
Ajax
- #13922: HEAD responses with application/json results parseerror
- #13388: Ajax request not returning responseXML
Attributes
- #13835: hasClass fails when class contains form feed
- #13809: Closure Compiler/YUI Compressor fail
- #13752: tabIndex propHook’s default value for non-focusable elements should be -1
- #13514: Setting “wrong” value of select-element using .val() is inconsistent in IE9 compared to other browsers
- #12072: Remove Firefox deprecated nodeValue, getAttributeNode, specified
Build
- #13741: Make wrap*/unwrap methods an optional module
- #13755: Update .jshintrc to match style guide
- #13776: License comment is breaking the SourceMap
- #13793: SourceMap on Google is broken
Core
- #12199: $.isPlainObject false positive in IE < 9
- #13223: JQUERY 1.9 + CLIENT-SIDE TEMPLATE = “SYNTAX ERROR, UNRECOGNIZED EXPRESSION”
- #13744: Move jQuery.fn.size to deprecated
Event
- #13554: Move [un]bind & [un]delegate to event-alias
- #13393: .focus() results in ‘Unspecified error.’ IE9, v1.9
Manipulation
- #13401: .replaceWith( “” ) with empty string not working
- #13596: .replaceWith should always remove the context set
- #13721: remove(“:nth-child(1)”) works differently than filter(“:nth-child(1)”).remove()
- #13722: replaceWith argument handling is inconsistent with other manipulation methods
Selector
- #13331: jQuery.fn.add returns incorrect order in Chrome and Safari
- #13420: jQuery 1.9.1 fails to filter SVG parent nodes by class name when using .parent() and .closest()
- #13505: jquery#add: seems to get items in collection out of order on larger lists
- #13777: IE7 jQuery attribute selector not working properly
- #13894: .children does not return direct child, but .find does [Firefox only]
Support
- #12040: Test against Content Security Policy (CSP)
- #13743: Remove jQuery.support.boxModel
- #13754: jQuery doesn’t work in a non-HTML document in UAs that have innerHTML on Element and create non-HTML elements via createElement
Traversing
- #13265: parent method fails with text nodes in IE10
- #13332: .closest(“*”) yields input even for non-element nodes
jQuery 2.0.1 Changelog
Ajax
Attributes
Data
- #13815: Setting data property with data(object) produces different results than data(key, value)
- #13850: .data() and removeData() doesn’t work correctly with hyphenated property
Effects
Event
- #13554: Move [un]bind & [un]delegate to event-alias
- #13255: jQuery 2.0b1 and Cordova 2.3.0 cause “Uncaught TypeError: Cannot read property ‘nodeType’ of null”.
Manipulation
Selector
Traversing
- #13819: Selection through children results in descending order
- #13846: jQuery 2.0.0 reversing order of returned elements
Should have called it jQuery Lite (or similar), that way both versions could have shared the same version number. Just sayin.
Impressive, i think i will stick to IE 8 support for another year.
Great job, team!
Thanks for your products
Thanks a lot for jQuery 1.10.0 and 2.0.1. I use both jQuery 1.x and 2.x with appropriate conditional comments.
FYI, the jQuery Blog is the only blog I care about that doesn’t have an RSS feed. I’ve waited years for an RSS feed to be added (or fixed?). With Google Reader shutting down, it seems that RSS feeds aren’t popular, so maybe the jQuery Blog will never have an RSS feed. I looked for a solution just now and learned that Twitter accounts have RSS feeds. Here’s the RSS feed for jQuery’s Twitter account, which isn’t full of typical Twitter noise:
https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=jquery
subsection1h : there is a rss feed. http://blog.jquery.com/feed/
Hi, ash. When I try to subscribe to http://blog.jquery.com/feed/ in Thunderbird, I receive an error stating that “the Feed URL is not a valid feed”. Also, that URL doesn’t validate at the W3C Feed Validation Service, so I’m guessing that Thunderbird isn’t the problem.
I’ve seen multiple commenters at the jQuery Blog state that the feed is broken for them too. The following search results bring up some of these comments:
https://google.com/search?q=site:blog.jquery.com+broken+feed+OR+rss
I recall that this issue was acknowledged at some point by one of the contributors at the jQuery Blog. I don’t recall who acknowledged it though, but I seem to recall that they stated it would be fixed eventually, which is why I didn’t look for a solution until today.
very good!
Hello, i have problem, one code is working for me in jquery 1.9.1,but not working in 1.10.0
its animating variables – carousel.animate({left: ‘-=’+width}); – i have no idea where is problem
Great work. Going to update now. Moved to jquery 2. Let’s move the web forward.
Wow, a new version already; great!
Not sure if I need to open a bug report, but where is the .map file please? Might be better to list here for those who host their own: http://jquery.com/download/
& perhaps it is missing, which would explain why cdnjs.com lists 2.0.1 & 1.10.0, with out .map, though prior .map versions are hosted?
> you now can do a custom build that excludes the .wrap(), .wrapAll(), .wrapInner() and .unwrap() methods
Sorry, neither the download page nor a site search brings up anything on how to do this. Can this be added please?
TIA!
The map is hosted on our CDN, you’ll see the map comment in the .min.js file. It looks like the CDNJS folks just forgot to copy it, you’d need to contact them.
The instructions on how to do a custom build are strategically hidden in the README.md file where you’d never think to look for them, and it has also been discussed in several older blog posts.
Shouldn’t this (in “Quick Access” below):
//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
be:
//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js
now?
@dmethvin: Sent suggestion to CDNJS, ty
>strategically hidden in the README.md
LOL there it is! Yea, I was expecting a link in this blog post at least, or official doc at jquery.com. I did a fast search here, & scanned the past few blog posts, but did not see anything.
@Clay The new versions were not on gooleAPIs or ASP.net last night when I looked; I assumed the US holiday w/e was to blame.
Anyone knows if the latest version of jQuery mobile is compatible with these releases yet? I know that 2.0.0 wasn’t. :(
Having a problem with .animate({ top: ‘-=’ + delta }) after upgrading from v2.0.0 to v2.0.1
JQuery Effect Animate isn’t working with relative values anymore.
ex: $.animate({width:’+=50px’});
I’m waiting for adjustments.
:)
Thanks.
Glad the ‘IE9 focus of death’ has been addressed. Cheers.
I didn’t even pay attention that the CDN link was google; why wouldn’t jQuery show their own CDN href, at least at first?
animate += 10 not working
@dmethvin CDNJS fixed! Not listed in their index yet, but they’re there now:
http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.0/jquery.min.map
http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.map
cheers
I added this:
//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js
…to a site in development, and it worked fine.
animate -=* don’t work :(
Still bloated.
I hope it is more lightweight.
Many thanks to all the people involved. jQuery has changed how client side web development is done and it made life much simpler. wonderful guys.