use fadeIn() and fadeOut() instead of CSS display property