Reputation: 31
Example here:
https://codepen.io/rfehre/pen/LrZVre
So I'm trying to fade in 'we' 'put' 'in' and 'work' sequentially. As it stands right now 'we' 'put' and 'in' come in very choppy and displace one another rather than fading into their final spots right off the bat.
I'm using .delay and fading in from a 'display:none' as it stands right now.
$(document).ready(function () {
$('.hidden1').delay(400).fadeIn(1000);
$('.hidden2').delay(800).fadeIn(1000);
$('.hidden3').delay(1200).fadeIn(1000);
$('.hidden4').delay(1600).fadeIn(1000);
});
What am I doing wrong?
Thanks in advance!
Upvotes: 1
Views: 46
Reputation: 521
Instead of display: none
use opacity: 0
, and instead of .fadeIn(1000)
use .animate({opacity: 1}, 1000)
.
Here is a working codepen: https://codepen.io/anon/pen/pKEyBJ
Upvotes: 2