michalsnik / aos

Animate on scroll library
MIT License
26.39k stars 2.56k forks source link

Content not showing on scroll #438

Open benbagley opened 5 years ago

benbagley commented 5 years ago

So I'm currently trying to implement AOS I tested the implementation on CodePen beforehand as a quick way of testing it, however, when moving the code to my project it doesn't work.

Here is the codepen https://codepen.io/ben_bagley/pen/rowJpw

and here is the implementation of my project

<section class="product-press" data-aos="zoom-in">
  <section class="bar">
    <img src="./images/usc-games.png" alt="USCGames" class="logo">
    <img src="./images/engadget.png" alt="Engadget" class="logo">

    <section class="video">
      <img src="./images/video.jpg" alt="">
      <a href="#">
        <img src="./images/green-play-button.svg" alt="">
      </a>
    </section>

    <img src="./images/tech-crunch.png" alt="Tech Crunch" class="logo">
    <img src="./images/zam.png" alt="Zam" class="logo">
  </section>
</section>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js"></script>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="./js/landing.js"></script>
<script>AOS.init();</script>

I'm getting no console errors, by the way, the content just isn't showing on scroll.

MarioPerini commented 5 years ago

codepen does work for me.

wowo101 commented 5 years ago

I seem to have a similar problem, although I can't reproduce it reliably: Sometimes certain elements (SVG images) don't appear on scrolling when the page has been open and scrolled down and up repeatedly; when I reload the page, most of time everything works again (until it doesn't). Any idea what could be happening? (I'm using 3.0.0-beta.6, BTW.)

agyrafa commented 5 years ago

same here...