The .fadeOut() method animates the opacity of the matched elements. Once the opacity reaches 0, the display style property is set to none, so the element no longer affects
animate with css opacity seems to achieve a similar effect.
$('#element').animate({opacity: 0}, 1000);
Run the same with opacity: 1 to fade back in.
Credit.