Last Updated: September 09, 2019
·
35.21K
· 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.

$(document).ready(function(){

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

});

3 Responses
Add your response

Yeeeeeeah!

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 ·