Animations do not appear

-1

Well, I'm trying to do some animations on scroll, but I do not know why, but I do not see any animation, the sections do not reveal. As I scroll down ...

Html:

I added the js-wp-1, js-wp-3, js-wp-4 class to the elements I wanted to animate.

CSS:

/* ---------------------------------------------- */
/* ANIMATIONS */
/* ---------------------------------------------- */


.js--wp-1,
.js--wp-3,
.js--wp-4{
   opacity: 0;                        
   -webkit-animation-duration: 1s;
   animation-duration: 1s;
}


.js--wp-1.animated,
.js--wp-3.animated,
.js--wp-4.animated{                              
   opacity: 1;
}

JS:

 /*Animations on scroll*/
        /*Animation 1*/
        $('.js--wp-1').waypoint(function(direction) {  /* Waypoint*/
            $('.js--wp-1').addClass('animated fadeIn');  /*Select animationçao*/
        }, {
            offset: '40%'
         });




        /*Animation 3*/
        $('.js--wp-3').waypoint(function(direction) { 
            $('.js--wp-3').addClass('animated fadeIn'); 
        }, {
            offset: '50%'
         });



        /*Animation 4*/
        $('.js--wp-4').waypoint(function(direction) { 
            $('.js--wp-4').addClass('animated fadeIn'); 
        }, {
            offset: '50%'
         });

Thank you guys!

PS: I'm using animate.css to make these animations.

    
asked by anonymous 09.05.2018 / 21:46

1 answer

1

Using the information posted in your question, animate.css alone has no link to scroll and I did not quite understand your attempt to add scroll detection.

However, I have a nice (and very easy to implement) alternative to what you're trying to do, using wow.js. That even uses the animate.css to do the animation.

Follow the link: wow.js

Any questions, you can comment.

I hope I have helped! :)

    
10.05.2018 / 00:21