What's new in jQuery 1.3

22 Dec 2008 | Jon Hobbs-Smith
John Resig has posted on the jQuery blog about the beta release of jQuery 1.3.

His post also contains a few details about what's new, most of which were included in the roadmap already published but there are a couple of surprises in there.

Sizzle Selector Engine



The new selector engine that John announced in August is here and apparently it can make certain tasks up to 400% faster in Firefox.

Native event delegation



I only posted last week about how event delegation can help you to optimize your code and it looks like jQuery will do it for you now, which means that any event handlers you add to a group of elements will automatically be added to matching elements when you create them.

Event Triggering



When you trigger events by using e.g. .click() events will bubble up through the DOM.

Dom manipulation and effects speed-up



Some of the DOM manipulation methods and animations have been speeded up, including append(), prepend(), before(), after(), hide() and show(). Speed can be up to 15x faster.

closest method



A new method for finding the closest matching element - .closest()

Feature testing instead of browser testing



Testing to see if the browser has a particular feature is often more reliable than just testing the browser so jQuery 1.3 has a new jquery.support method. They're setting a good example by using it internally throughout.


I'll post more when I've had a chance to have a proper play with the new features.

comments

Nitin Reddy Katkam @ 23 Dec 2008 9:59 AM

jQuery was a pretty big leap for me from manually-written Javascript. I prefer to use jQuery whenever I have to select a particular type of objects and execute some Javascript on them (Eg. check all checkboxes with the CSS class "oldItem")

I've always wondered - what would be the next big step for jQuery? I guess "feature testing" would be my pick, though I haven't been able to try it out yet. "Closest" sounds cool, but I'm not sure where I'd want to use it.

tareq @ 9 Feb 2009 6:13 AM

wow great , its good improvement.But hover function needs to increase more speed :~)

ZK@Web Marketing Blog @ 17 May 2009 8:39 PM

jQuery celebrated its third birthday Wednesday with the release of the brand-new 1.3 version. This latest release includes a bunch of cool new stuff which has already been discussed to death elsewhere. To me, however, the most interesting aspect of jQuery 1.3 is the movement of former plugin functionality to the core library.