css animate add class when scrolling (one pager)

1k Views Asked by At

I'm trying to fire animate.css events when page is scrolled (one pager).

Basically I'd need jquery to add for example class .animate to every visible element in view that has for example class .anim


Additional points: if there a way to add data-delay attribute to my html so that jquery would parse it with delay

for example Hello

1

There are 1 best solutions below

2
On

Add class to all elements you want to add the .anim class like i have done in example add and then write the following jQuery code

if (scroll >= 500) {
    $(".add").addClass(".anim");
}

and for more details plz check out this DEMO JSFIDDLE

Also check this link