jQuery 1.3 Released
The important features of this release are:
- "Live Events" (also referred to as Event Delegation): a new API for binding events to current and future DOM elements. The
live()function is used to bind an event to all matched elements, including future matched elements that are added to the DOM. The
die()function removes the bound live event.
- A rewrite of jQuery's event handling. The introduction of a jQuery.Event wrapper object brings jQuery's event model in line with W3C standards and makes events work smoothly across all browsers; the wrapper also allows arbitrary data to be associated with events. All triggered events now "bubble up" the DOM tree, but progress can be halted via a
- A rewrite of HTML injection (e.g., the
aftermethods) for much greater speed (heavy use of DOM Fragments).
- A rewrite of the
offset()method for better cross-browser compatibility as well as greater speed.
- No more browser sniffing. As of 1.3, jQuery no longer uses any form of browser/userAgent sniffing internally. Instead, a technique called "feature detection" is used to simulate a browser feature (or bug) internally to see if it exists or behaves as expected. All of these checks are encapsulated in the jQuery.support object.
In other news, there is a new API browser for jQuery (written by Remy Sharp), which is available online or as an AIR application. The project has also decided to join the Software Freedom Conservancy and will continue to be developed under its auspices. John Resig elaborates on the reasons for the move in his blog entry.
The new release can be downloaded from the main page.