Last Updated: September 09, 2019
· codesbyaxel

Fade in page on load

With this simple jQuery-code you can fade in your website on load. By default, the fading-process is set to 500 milliseconds, but you can change this to whatever suits your needs.


/*! Fades in page on load */
$('body').css('display', 'none');


3 Responses
Add your response


over 1 year ago ·

Chain :)

$('body').css('display', 'none').fadeIn(500);

over 1 year ago ·

<body style="display:none;"> </body> is good but what if user dont have javascript enabled ?

over 1 year ago ·