The contents of a fadeOut callback are supposed to be executed after the fadeOut has completed but there are problems when fading out multiple selectors (the alert is used to demonstrate).
$("#foo, #bar").fadeOut( function(){ alert('test'); $("#baz").fadeIn (); }) >>> #baz is faded in before the fadeOut has completed $("#foo, #bar").fadeOut( function(){ if( this.id == 'foo' ){ alert ('test'); $("#baz").fadeIn(); }}) >>> for some reason this works $("#foo, #bar").fadeOut( function(){ if( this.id == 'bar' ){ alert ('test'); $("#baz").fadeIn(); }}) >>> but this doesn't - it does the same as the first example Anyone know why? Is this a bug?