jQuery
Instance;Event;Performance;Mobile;Basic
fx
abbr.fractures Fractured fractured; for eksempel (Dano-Norwegian=for example) (Norwegian) for example; fixed fixed
##off
英[ɒf] 美[ɔ:f ] prep.Leave;fall from;remove from;get off workadv.leave;distance,distance;cancel;get off workadj.stale; Unacceptable; impoliten.Startv.Kill
jquery jQuery.fx.off attribute syntax
Function:jQuery.fx.off property is used to globally disable or enable all animations. The default value is false, which allows the animation to run normally. When set to true, all animation methods are disabled, which sets the element to its final state rather than displaying the effect. To simplify your code, use $.fx.off instead of jQuery.fx.off.
Syntax: jQuery.fx.off = true|false;
Parameters:
Parameter | Description |
true | Specifies that animation should be disabled. |
false | Default. Specifies that animation should be enabled. |
jquery jQuery.fx.off attribute example
<!DOCTYPE html> <html> <head> <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#disable").click(function(){ jQuery.fx.off = true; }); $("#enable").click(function(){ jQuery.fx.off = false; }); $("#toggle").click(function(){ $("div").toggle("slow"); }); }); </script> </head> <body> <button id="disable">jQuery.fx.off = true ( 禁用 )</button> <button id="enable">jQuery.fx.off = false ( 启用 )</button> <br><br> <button id="toggle">切换动画</button> <div style="background:#98bf21;height:100px;width:100px;margin:50px;"> </div> </body> </html>
Click the "Run instance" button to view the online instance