JQuery Core 1.9 Upgrade Guide
jquery.com
jquery.com
That one is gonna cause some headaches, I've abused this behavior for years, as recently as yesterday.
It is easy enough to drop back down to calling XMLHttpRequest by hand. Sample code is here, and changes to jQuery won't break it: http://stackoverflow.com/questions/5395118/jquery-1-5-json-e...
jQuery 2.0 (early 2013, not long after 1.9): This version will support the same APIs as jQuery 1.9 does, but removes support for IE 6/7/8 oddities such as borked event model, IE7 “attroperties”, HTML5 shims, etc.
Our goal is for 1.9 and 2.0 to be interchangeable as far as the API set they support. When 2.0 comes out, your decision on which version to choose should be as simple as this: If you need IE 6/7/8 support, choose 1.9; otherwise you can use either 1.9 or 2.0.
http://blog.jquery.com/2012/06/28/jquery-core-version-1-9-an...
jQuery has always made feature changes/additions on .x releases. We're saving the 2.0 moniker for removing oldIE because that is a much more significant change than these API cleanups.
At this point the jQuery installed base is so big that any change, however innocuous, is a breaking change for someone. Even fixing bugs, conforming to W3C standards, or making API return values consistent can cause trouble because someone depends on the old way of doing things. We try to be respectful of people's existing work but also want to make forward progress.
Like the intro at the top of the upgrade guide page says, this list seems a lot more scary than it really is. We're just trying to call out every change that we think may cause issues, so people can assess and address them in advance.
The jQuery Migrate plugin is designed to make it easier to find any compatibility problems, and can be included with jQuery versions as old as 1.6. Add the plugin to your current code, run it, and view the console to see if there are warnings.
It would also be nice for them to adopt semantic versioning with 2.0. i.e. move to 2.0.0
That said, I've always found jQuery's function naming to be particularly ambiguous. There's no indication that "find" searches an element's descendants for a matching CSS selector based on its name. On the other hand, vanilla JS's element.getElementsByTagName is so much more verbose. Back in the day I found PrototypeJS [0] to be much better organized and offer the same feature set, but it's largely fallen out of use since Rails dropped it. mootools is nice but the docs, while comprehensive, are arranged in no logical order. Every time I try to pick up mootools I end up running around the docs in circles.
tl;dr jQuery is overblown but I think there's room for improvement over vanilla JS.
Plus there's always the (literally) hundreds of plugins for every possible application of jQuery.
I'd love to see a JS library that doesn't try to add a lot of functionality, but only decruftify the browser API.
The right aim would be to end up with a complete API that might actually replace the normal JS api (DOM+otherwise) in actual browsers.
var elem = document.getElementsByClassName('foo')[0];
elem.fooBar();
elem.foo = 'bar';
rather than $('.foo').fooBar();
$('.foo').foo = 'bar';
even if you don't know anything about writing optimized JavaScript code.A modern, more minimalist alternative would be a nice thing, but at the moment I think jQuery is probably still a good bet for simple cases.
And as far as "not targeting old browsers" there are plenty of places where modern browsers differ and jQuery normalizes their behavior. Chrome doesn't support mouseenter, Firefox doesn't support focusin, Safari's String.trim() doesn't trim zero-width spaces, their CSS uses prefixed properties, etc.
Also, talking about jQuery in isolation is like talking about C++ without its runtime library. One of the strengths of jQuery is its ecosystem such as plugins.
However, jQuery's main feature is having a nice interface that is much more consistent and usable than many of the native APIs. The "fluent interface" or "method chaining" style is especially nice.
You can also mow your lawn with a pair of scissors, which is about like doing anything non-trivial in the browser without jQuery.