How to wait for some event on each element in parallel before continuing?

Compact syntax with timing methods:

1
$('.many').each().wait(event).all().doSome().jQueryStuff();

Compare this to the old way with more syntactic fluff:

1
2
3
4
5
6
var waiting = $('.many').length;
$('.many').one(event, function(){
   if (!--waiting) {
   	$('.many').doSome().jQueryStuff();
   }
});

Similar patterns with closed loops

Similar patterns with parallel loops