Pony.fm/app/scripts/shared/jquery-extensions.js

14 lines
344 B
JavaScript
Raw Normal View History

2013-07-30 06:53:57 +02:00
if (jQuery.when.all===undefined) {
jQuery.when.all = function(deferreds) {
var deferred = new jQuery.Deferred();
$.when.apply(jQuery, deferreds).then(
function() {
deferred.resolve(Array.prototype.slice.call(arguments));
},
function() {
deferred.fail(Array.prototype.slice.call(arguments));
});
return deferred;
}
}