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.
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
Tweet
1 comment:
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.
Post a Comment