Learn and share. The simplest harmony.

 

[CodeSnippet] jQuery : Fade In Webpage

Posted on April 4, 2010 and got 3 shouts so far

The following short code is a way to add a fade in effect to your webpage. The main task we want to do are hiding our webpage content then display it with fade in effect when the user load the webpage. These step will use two jQuery built-in function, hide() and fadeIn().

$(document).ready(function() {
	$('body').hide().fadeIn(1000);
});

First we hide the whole body using hide() and display it using fadeIn() in 1000 milliseconds. The last, never hide your whole body using CSS and display them using JavaScript to avoid your content stay hidden because of the user disabling the JavaScript.

 

This Post Tags :

Bookmark Post :

  • it’s so simple but nice
    thx for share :)

  • This is such an easy implement for such a great effect. Thanks for sharing.

  • Great effect! (And very useful for a noob like me) Thanks a lot!