Reputation: 33
I have a page with many jQuery animations, each has it's own duration defined individually.
I want to disable all the animations on mobile devices by setting the duration to 0.
Is there a way to overwrite all the animation durations globally?
something like this:
if (isMobile()) {
$.animation.duration.disable = true;
}
Upvotes: 2
Views: 135
Reputation: 263009
You can set jQuery.fx.off to true
:
if (isMobile()) {
$.fx.off = true;
}
Upvotes: 5