WOW js dont trigger animation until class is active

586 views Asked by At

I'm using WOW which I have used on other projects and its great. However on a current website I'm building, which is using slides (divs), it displays all the animations at the same time rather than once each slide is active.

When a slide is active/shown a class .pt-page-current is added to the parent div. What I would like to do is create a script to only allow WOW to trigger the animations if the slide has a class of .pt-page-current.

Here is a test version to show what I'm talking about. The second slide with the text 'Dave's had an idea..' should slide in, however its doing the animation straight away so you dont see it.

Is there a way to adapt this script to not trigger the animation until the class .pt-page-current is active?

<script>
new WOW().init();
</script>
0

There are 0 answers