How to wait for the end of the elements' current animations for a given queue name?

Compact syntax with timing methods:

1 $('.some').join(queue).doSome().jQueryStuff();

The join() method also provides a parameter to wait for an empty queue instead of the current animations' end.

Compare this to the old way with more syntactic fluff:

 1 var waiting = $('.some').length;
 2 if (!waiting) {
 3 	$('.some').doSome().jQueryStuff();
 4 } else {
 5   $('.some').queue(queue, function(next){
 6     next();
 7     if (!--waiting) {
 8       $('.some').doSome().jQueryStuff();
 9     }
10   });
11 }

Similar patterns with animations