As 2009 draws to a close, there are many things to look forward to in the New Year: Google Wave hitting the big-time, Typekit as a real alternative to sIFR and Cufon, developments in mobile Web technology and (hopefully) an end to supporting IE6! One thing I’m particularly looking forward to is the new version of jQuery, slated for a mid-January release.
John Resig, the creator of jQuery and guru of all things Javascript, has kept us up-to-date nicely on the state of jQuery in 2009. To kick off 2010 we’ll be getting a new version, which is great news for jQuery fans.
The main aim for the jQuery team, as ever, is to improve performance. Version 1.3 included the Sizzle selector engine, which improved selector performance and inspired many articles on how best to optimise your jQuery.
jQuery 1.4 features
jQuery 1.4 includes a slew of improvements and new features, the official roadmap gives a detailed view of what’s been implemented. The big features are:
- four new live event handlers: “change”, “blur”, “submit” and “focus”
- a lazy loader method that requires other scripts be loaded before the document ready function fires
- $.contains which can determine if an element is inside another one eg. $(‘div’).contains(‘ul’)
- syncronised animations (as seen on John’s own example – click on any of the coloured blocks)
Other features include a radioClass method which adds a class to one element and removes it from its siblings, an event listener for the mouse wheel (likely to be very basic) and a “set offset” method which can get or set the specified top and left positions of matched elements, relative to the browser window – a very useful cross-browser method, indeed!
The beta is already out, though naturally not completely bug-free, it’s a preview of what’s to come for those of us who just…can’t…wait!
John recently gave a great talk on Javascript testing. It may be a bit technical for the average jQuery user, but the last section on improvements made in v.1.4 is interesting nonetheless.
Tags: javascript, jquery
Home
