1 line
1.4 KiB
JSON
1 line
1.4 KiB
JSON
{"name":"jQuery.fx.off","type":"property","title":"jQuery.fx.off","deprecated":null,"removed":null,"desc":"Globally disable all animations.","categories":["effects/custom-effects","properties/global-jquery-object-properties","version/1.3"],"entries":[{"return":"Boolean","signatures":{"added":"1.3"},"examples":{"desc":"Toggle animation on and off","code":"\nvar toggleFx = function() {\n $.fx.off = !$.fx.off;\n};\ntoggleFx();\n$( \"button\" ).click( toggleFx );\n$( \"input\" ).click(function() {\n $( \"div\" ).toggle( \"slow\" );\n});\n","css":"\n div {\n width: 50px;\n height: 30px;\n margin: 5px;\n float: left;\n background: green;\n }\n","html":"\n<input type=\"button\" value=\"Run\">\n<button>Toggle fx</button>\n<div></div>\n"},"longdesc":"\n <p>When this property is set to <code>true</code>, all animation methods will immediately set elements to their final state when called, rather than displaying an effect. This may be desirable for a couple reasons:</p>\n <ul>\n <li>jQuery is being used on a low-resource device.</li>\n <li>Users are encountering accessibility problems with the animations (see the article <a href=\"http://www.jdeegan.phlegethon.org/turn_off_animation.html\">Turn Off Animation</a> for more information).</li>\n </ul>\n <p>Animations can be turned back on by setting the property to <code>false</code>.</p>\n "}]} |