In a recent study it has been said that about 50% of major websites use jQuery. It has become omnipresent and you can actually find job listings that does not list javascript as a skill but list jQuery.

You don’t have to search far to understand why. Using jQuery is the easiest way to add interactions to a website. The api is intuitive, easy to use, the documentation is solid, it works cross-browser & that api very rarely changes.

Or was.

2.0 will be a major rewrite removing support for ie8 and earlier releases, it also removes a bunch of deprecated methods. 1.9 already started the ball removing a lot of stuff in preparation of 2.0, including the live api, and that made a bit of drama. Of course they created tools to make it has painless has possible to migrate but the facts remains, jQuery will change a lot in 2013.

One of the heartbreaker for me is how they now handle HTML strings vs selectors in 1.9. I won’t go in details but here’s how I need to handle underscore templates now because some of my templates start with a space or tab:

$( $.parseHTML( _.template($(“#content”).html(),{})));

A small anecdote

Less than one year ago I had to take a skill test in a major firm in Montreal. In it, some jQuery tidbits, one of those asked me which of these methods I should use in certain conditions, between live(), delegate() and bind(). Nothing on the unified on() method. Trying not to be an ass I added some explications on the on() api instead of the choices I had.

But that made me think about decapreated jQuery methods and the users expectations of support from the jQuery team. Most web devs I know that are not passionate about front-end still have a very good knowledge of jQuery, and most of them expect two things. First is it’s not going to change and secondly it’s compatible cross-browser.

In the end..

The biggest reason why jQuery became popular was that it had an unified way to make work complex solutions on ie6, ie7 & firefox.

We are losing a bit of both those points that the average user expects from jQuery and that makes me feel awkward about the new releases. Not to say jQuery should not move forward, my feeling is probably wrong but it’s still the feeling I got right now.

5 thoughts on “The jQuery 1.9 & 2.0 upgrade awkwardness”

Change is never comfortable, unless one is the change agent, in which case it is not only inevitable, not changing would be admitting defeat.

1.4+ got us to where we are today , like my faithful old car the journey would have been impossible without it, and for some projects that need support for those legacy browsers it will remain indispensable.

2+ is a different beastie, it remains to be seen as to wether it will be as successful as its older brother. Supporting new devices and new APIs can only be a good thing for those employed to do so.

On balance I’m not worried, unless Devs and management think they can swap out old for new without regression and rewrites.

I fully agree with this. The major reason to use jQuery was to write JS that worked across all the major browsers. jQuery took care of all the little nuances for you, I didn’t have to worry about attachEvent vs addEventListener, or my own ajax function with multiple conditions depending on the browser, Sizzle also made things a bit easier before querySelector. However with things like qsa, classList, forEach etc in use in all of the major browsers now I really don’t see the need for jQuery anymore. Many of the things abstracted really don’t need it.

I wouldn’t get in a tizzy about losing ie8 support in upcoming versions of jQuery.

If you need support for older browsers, more than likely you’re working on an older and (probably) very specialized project. Probably inside a corporate walled garden that for some reason is locked to old IE. Nobody will FORCE you to update your version, and the old versions will continue to work. It’s not like they’re releasing new versions because of some “omigod you have to update now because of sploit x!!!”

In the wild, IE users are generally updating as new releases come out. IE8, unfortunately is still the most advanced version available to XP users, but even those guys are dying in the wild, and Microsoft will end all support for XP by 2014.

The world moves on. Dropping support for older browsers forces the industry to move forward. Microsoft finally “gets it” on that score, and IE9+ has finally started becoming a good citizen again (not that I plan on using it anytime soon for myself … but I have to support it). I can’t blame the jQuery team for dropping support for <= IE8 … the gyrations I've gone through to keep < IE8 happy these days have become increasingly arduous. My company has recently dropped support for IE7 … I can't wait until we drop IE8!

Hi,
your jQuery-Validation-Engine doesn’t seem to work anymore with jquery 1.9.
I think, it has something to do with the “live-function” used in line 27 of “jquery.validationEngine.js”. Do you have any plans to fix this bug?