matthieua / WOW

Reveal CSS animation as you scroll down a page
https://www.delac.io/WOW/
9.92k stars 4.11k forks source link

support : how to trigger a jquery script at the end of a WOW animation #343

Open alexglvr opened 5 years ago

alexglvr commented 5 years ago

HI,

I have a wow animation :

<nav class="navbar wow fadeInDown" data-wow-delay="0.5s" data-wow-duration=".5s" id="top-nav">...</nav>

I would like to trigger a jquery function as soon as it ends.

Any help please?

Thanks

Alex

moeenio commented 4 years ago

Something like this, with additionnal code to detect what node is concerned (using box) :

var wow = new WOW({
  callback: function(box) {
    setTimeout(function() {
      // whatever scripts you want to run
    }, <your animation duration>);
  }
}).init();