FadeIn Page Elements on load

Einzelne Seitenelemente einfaden lassen.

by David Manser

HTML

<div id="main">

<div id="first">
This is the first line of text
</div>

<div id="second">
Now the second
</div>

<div id="third">
And finally, here's the 3rd!
</div>

</div>

CSS

#main{
  position:relative;
  padding:30px;
  font-size:36px;
  font-family: helvetica, arial, sans-serif;
  text-transform: uppercase;
  font-weight: lighter;
  color: gray;
  }

#first {
    postion:absolute;
    top:0;
    height: 40px;
    width: 600px;
    display: none;
}

#second {
    postion:absolute;
    top:40px;
    height: 40px;
    width: 600px;
    display: none;
}

#third {
    postion:absolute;
    top:80px;
    height: 40px;
    width: 600px;
    display: none;
}

JavaScript

// $(document).ready(function(){    
$('#first').delay(200).fadeIn(500);
$('#second').delay(600).fadeIn(1400);
$('#third').delay(1200).fadeIn(2000);
// })