Offering a sneak peak of what will be in the new version, John Resig has released the first in a series of patches to jQuery in preparation for the 1.3 beta release. They are:
- A patch to the
.domManipmethod to use DocumentFragments, resulting in manipulation code (append,prepend, etc.) that is about 15x faster. - Addition of a .
closest(selector)method which starts with the current node and traverses the parents in the DOM tree to match the selector (think "first self or ancestor"):
closest: function( selector ) { return this.map(function() { var cur = this; while ( cur && cur.ownerDocument ) { if ( jQuery(cur).is(selector) ) return cur; cur = cur.parentNode; } }); } - A patch to the seminal DOM
ready()method that backs off attempting to detect the loading of stylesheets (apparently not possible according to Resig) to normal "document ready" functionality. - Addition of multiple-namespace support for events.
- A new internal property that keeps track of the selector chain (mainly for use by plug-in authors).
The new jQuery 1.3 will also feature the Sizzle JavaScript CSS selector engine as well as revamped implementations of all the selector-based methods.
You can read all about the new patches in Resig's original post here.
Update: the new Sizzle engine has been added to the 1.3 trunk.
Delicious
Digg
StumbleUpon
Propeller
Reddit
Magnoliacom
Newsvine
Furl
Facebook
Google
Yahoo
Technorati
Icerocket
Recent comments
4 weeks 13 hours ago
5 weeks 2 days ago
6 weeks 3 days ago
6 weeks 4 days ago
6 weeks 6 days ago
7 weeks 1 day ago
7 weeks 1 day ago
9 weeks 4 days ago
9 weeks 6 days ago
9 weeks 6 days ago