waypoints
waypoints copied to clipboard
Sequential animation by adding classes with delay
Hi,
I try to to make sequential animation by adding classes with delay. Below you can see my code but it works well only for the first visible elements. As I wait after first load and scroll down, all the other elements are waiting too long to appear.
Has someone a solution? Regards J
$('.animate-it').each(function(i) {
var $ell = $(this);
var waypoint = new Waypoint({
element: $ell,
handler: function(direction) {
function gooo(direction) {
$ell.addClass('visible animated fadeInUp');
};
waypoint.destroy();
setTimeout( gooo, 300*i );
},
offset: '90%'
});
});