I'm using WOW.js to animate a few div
containers and would like to avoid the data-*
attributes.
Example HTML
<div class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="5s">Content</div>
Example JS
var wow = new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: true,
live: true
});
wow.init();
Is it possible to control the data attributes duration, delay, offset and iteration by a class or by JS, e.g. on init()?
My workaround would be to search for classes like class="wowDelay-5s"
and add an attribute to it's element as data-wow-delay="5s"
, but I prefer the proper way, if there is any.
Thanks in advance!