1

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(){});

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
Truextacy
  • 562
  • 1
  • 5
  • 26
  • Can you not just change the CSS of the class that gets added, or is that not what you mean? Probably will need to add more detail of what you want to do if it's not that simple. – cjl750 Feb 17 '18 at 06:02
  • I want to style a completely different element when that events triggered. – Truextacy Feb 17 '18 at 06:03

1 Answers1

3

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

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624