mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 22:47:59 +01:00
14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
|
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;
|
||
|
}
|
||
|
}
|