Your user or web application may require that all animations are disabled, but the effect of revealing information or scrolling (or whichever animation type) may still be required. jQuery has a way to disable all animations from one access point but still supports the animate method and its final value.
$.fx.off = true;
$(document).ready(function () {
$('#animate').click(function () {
$('.box').animate({ width: '+=100', height: '+=100' });
});
});
By setting fx to off using the following line, all animation calls have the same effect as calling css() directly:
$.fx.off = true;
This can be set at any point and it will disable the animations, which means it can be
offered as a user preference. To enable animations again
$.fx.off = false;
0 Comment(s)