Hmm, with .reduce() you have:
$('[id^=row]').toArray().reduce(function(l,r){
return l.pipe(function(){
return $(r).animate({opacity:opacity}, 100);
});
}, $.Deferred().resolve());
but without .reduce() you have:
var pipeline = $.Deferred().resolve();
$('[id^=row]').each(function(index, row) {
pipeline = pipeline.pipe(function() {
return $(row).animate({opacity:opacity}, 100);
});
});
(untested) which is, to my eyes at least, more readable. Just because you
can do anything with .reduce() that you can do with a for loop doesn't mean you
should.