jQuery 1.5 Released: What’s New




The jQuery team has released jQuery version 1.5, right on schedule! This release includes several performance improvements, bug fixes, major re-write of the Ajax module with extensibility improvements, a Deferred callback management system and much more.

Here’s a quick overview of what’s new in jQuery 1.5

Ajax Module Rewrite

jQuery.ajax now returns a jXHR object (instead of XMLHttpRequest) which is a wrapper over the XMLHttpRequest object. This allows a consistent interface over the different browser implementations of XMLHttpRequest object. One of the benefits of this object is seen while aborting JSONP requests and much more.

jQuery jxhr

As of jQuery 1.5, $.ajax() also provides three means to extend its functionalities for sending, receiving, and managing ajax requests: Prefilters, Converters and Transports. Read more at Extending Ajax

Deferred Object

A Deferred object is a chainable utility object to manage multiple callback queues and relay the success or failure state of any synchronous or asynchronous function. The jXHR object explained above, implements the new Deferred Object which allows you to assign multiple callbacks on a single request, and even to assign callbacks after the request may have completed. Cool!

Using Deferred objects, you can assign handlers immediately after making the request as shown here

Observe above how we have assigned multiple event handlers for success, error and complete, just after making a request to the customer.aspx page (not possible earlier)

Check out this nice in-depth tutorial from Eric Hynds Using Deferreds in jQuery 1.5 and the official jQuery documentation on Deferred Object

jQuery.Sub()

Using jquery.Sub(), you can override native jQuery methods without actually destroying them. In simple words, it allows you to clone a jQuery instance whose properties and methods can be modified without affecting the original jQuery object.

Performance and Bug fixes

The performance of several commonly used DOM traversal methods like the .children(), .prev(), and .next() have been improved. Read more at Performance Test Case and Raw Numbers

This release also has 83 bug fixes

Important Links

Download jQuery 1.5 (regular) or jQuery 1.5 (minified)

Microsoft CDN: http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.min.js

Google CDN: https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js

New or Changed in jQuery 1.5

jQuery 1.5 API Documentation



Will you give this article a +1 ? Thanks in advance




About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

1 Response to "jQuery 1.5 Released: What’s New"
  1. asp.net ecommerce said...
    February 2, 2011 at 4:55 AM

    Thanks for sharing this information. I have visited many blog posts of this site and always find some great article. I like this site and I will keep visiting this site often.

 

Copyright © 2009-2014 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions