Disable velocity.js animation for mobile

I've created some Velocity.js animations that work well on a laptop using Chrome, Safari and Firefox, however the animations sometimes crash or don't show up on my ipad2. Due to the fact that it sometimes works, it seems to me that I trust my ipad2. My question is, is it possible to disable animation for ALL mobile devices so that they display non-animated content?

Suppose it needs to be done with JavaScript ??

Thanks in advance!

+3


source to share


1 answer


You can use mock

, see docs , the Velocity property to increase the duration and duration of all animations to 0. Just to demonstrate the idea, something like:

Velocity.mock = /iPad|iPod/.test(window.navigator.userAgent);

      



But it would also be great if you could minimize splitting animations into separate tests on jsFiddle / codepen / jsbin / etc, and in case you see issues being reported in the Velocity repository tracker.

+3


source







All Articles