I am using wow.js to animate different elements on the page when scrolling. Now I want to rise the animation only on the specific paragraph when clicked on the button (in jQuery).
<p id="reasons" class="wow fadeInUp" data-wow-delay="0.2s">x y z</p>
I don't want to initialize the page with the animation once again (see below), but only animate this concrete paragraph (with id = "reasons"
).
new WOW().init();
How can I do this?
HTML:
<button type="button" class="btn btn-default" id="mybutton">button</button>
<p id="reasons" data-wow-delay="0.2s">x y z</p>
JQuery:
$("#mybutton").click(function(){
$("#reasons").addClass("wow fadeInUp animated");
$("#reasons").attr("style","visibility: visible; animation-name: fadeInUp;");
});
On bootstrap tabs it also works. :-)