I've been doing some reading about queueing JS callbacks without stacking them over here, How do I animate in jQuery without stacking callbacks?
I've tried playing around Julian Aubourg's answer, and I noticed that after removing the "return" statements from the functions, everything happens at once.
I'm just wondering what the behavior of these return statements are, and what role they play in making this code synchronous.
$('div1').fadeOut('slow').promise().pipe(function() {
return $('div2').fadeOut('slow');
}).pipe(function() {
return $('div3').animate({ top: 500 }, 1000 );
});