over 11 years ago
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' });
- });
- });
$.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:
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
Can you help out the community by solving one of the following Business Intelligence problems?
Do activity (Answer, Blog) > Earn Rep Points > Improve Rank > Get more opportunities to work and get paid!
For more topics, questions and answers, please visit the Tech Q&A page.
0 Comment(s)