waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

Sequential animation by adding classes with delay

Open JQOz opened this issue 7 years ago • 0 comments

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%'
    });
}); 

JQOz avatar Feb 17 '18 17:02 JQOz