Top add

Showing posts with label deferred. Show all posts
Showing posts with label deferred. Show all posts

Jquery 1.5 deferred function

Jquery 1.5 has been released on 31st January. If includes existing bug fixing and ajax improvements. New methods Deferred is been introduced in 1.5

Deferred :

This function can be used in place for ajax. Suppose if we want to call a settimeout means we should manually call the javascript function. Now we can use this function

Example for settimeout:
$.wait = function(time) {
return $.Deferred(function(dfd) {
setTimeout(dfd.resolve, time);
});
}