Search code examples
jqueryanimate.csswow.js

Wowjs Event Trigger


I am trying to key off a wowjs event so I can apply my own styling when it is revealed. Does anyone know of something that does this or will I just have to key off a scroll event?

Something like this would be great $('#someId .fadeInUp').on('trigger', function(){});


Solution

  • Yes, you can pass in a callback function like this...

    var afterReveal = function(e){
        // do whatever you want with element here
        var $ele = $(e);
        $ele.addClass("foo");
    }
    
    var wow = new WOW({
        callback: afterReveal
    });
    
    wow.init();
    

    Demo