I was wondering if the is any way to wait until the fadeOut is complete before the fadeIn commences, as when i run the following code, it places one div under the other, the
Another option is using promise which will wait for all pending animations on .sidebarform to complete first even if they were started elsewhere:
$('.sidebarform').fadeOut('slow').promise().done(function() { $('.sidebarsuccess').fadeIn('slow'); });