Kuzry
Kuzry

Reputation: 33

How to check Velocity is animated

In jQuery we have:

.is(':animated')

But this doesn't work for velocity.js.

How to check the element is an animated?

Upvotes: 3

Views: 1011

Answers (1)

ydaniv
ydaniv

Reputation: 1289

Velocity adds the class velocity-animating to elements that are being animated.

So you should be able to do it as follows:

.is('.velocity-animating')

See here and here in the code.

Couldn't find it in the docs though I remember it was covered.

Upvotes: 6

Related Questions