wow.js happens on page load and not on scroll

后端 未结 9 1050
孤独总比滥情好
孤独总比滥情好 2020-12-16 12:32

I\'m using wow.js, and it works fine, except the animations all happen immediately after the page load, and not when they are scrolled to. I followed the docs, but can\'t fi

相关标签:
9条回答
  • 2020-12-16 12:37

    In accordance with @DesignofKA post. For me it conflicted wit this line of code:

     -webkit-overflow-scrolling: touch;
    

    Hopefully this was helpful.

    0 讨论(0)
  • 2020-12-16 12:42

    Had same problem. was using class="wow bounceInUp"

    Then I tried class="wow bounceInUp animated"

    And it worked

    EDIT: in the end, it didn't work. It worked at first but then stopped. Even bigger mystery :S

    0 讨论(0)
  • 2020-12-16 12:42

    I came across this same problem and I just figured it out. The issue was that the <script> in the footer is incomplete, or at least it didn't work to me.

    Whoever's got this problem give a try to this code instead, just before the </body> tag:

    <script>
    wow = new WOW( {
        boxClass:     'wow',
        animateClass: 'animated',
        offset:       100
        }
    );
    
    wow.init();
    </script>
    
    0 讨论(0)
  • 2020-12-16 12:42

    It would be helpful if I knew the browser you are using and the WOW.js version.

    Also, please give the latest version a try, we've done some changes to address issues with Firefox which might fix your problem too. Particularly, in 0.1.9.

    If your problem persists, please report the bug, and try to provide an example page and tell us which browser are you using.

    0 讨论(0)
  • 2020-12-16 12:50

    I had a similar problem. I had just forgotten to add

    <!DOCTYPE html>
    

    The answer here helped - wow.js only works when scrolling up

    0 讨论(0)
  • 2020-12-16 12:51

    Here's the solution I found via a closed Github Issue: you can add this to your CSS:

    .wow {
       visibility: hidden;
    }
    

    WOW will then toggle it to visible when starting the animation.

    0 讨论(0)
提交回复
热议问题