Followers

Thursday 12 December 2013

jQuery 1.4.2 Released

jQuery 1.4.2 Released



jQuery 1.4.2 is now out! This is the second minor release on top of jQuery 1.4, fixing some outstanding bugs from the 1.4 release and landing some nice improvements.
I would like to thank the following people that provided patches for this release: Ben Alman, Justin Meyer, Neeraj Singh, and Noah Sloan.

Downloading

As usual, we provide two copies of jQuery, one minified (we now use the Google Closure Compiler as the default minifier) and one uncompressed (for debugging or reading).
You can feel free to include the above URLs directly into your site and you will get the full performance benefits of a quickly-loading jQuery.
Additionally you can also load the URLs directly from either Google or Microsoft’s CDNs:

New Features

A full list of the API changes can be found in the 1.4.2 category on the jQuery API site.
In this release we’ve added two new methods: .delegate() and .undelegate(). These methods serve as complements to the existing .live() and .die() methods in jQuery. They simplify the process of watching for specific events from a certain root within the document.
For example:
$("table").delegate("td", "hover", function(){
 $(this).toggleClass("hover");
});
This is equivalent to the following code written using .live():
$("table").each(function(){
 $("td", this).live("hover", function(){
  $(this).toggleClass("hover");
 });
});
Additionally, .live() is roughly equivalent to the following .delegate() code.
$(document).delegate("td", "hover", function(){
 $(this).toggleClass("hover");
});

What’s Changed?

There has been some large code rewrites within this release, both for performance and for fixing long-standing issues.

No comments:

Post a Comment