Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery jQuery.fx.off Example</title> <script src="https://code.jquery.com/jquery-1.8.3.min.js"></script> <style> #box { width: 80px; height: 80px; background: orange; position: relative; margin-top: 20px; } button { margin-right: 10px; } </style> </head> <body> <h2>jQuery <code>jQuery.fx.off</code> Property</h2> <p>This example demonstrates the <code>jQuery.fx.off</code> property to globally disable or enable all jQuery animations. Click "Disable Animations" to instantly turn off animations—affected animations will jump to their end state without transition.</p> <p>Use "Enable Animations" to restore normal animated behavior before starting a new animation.</p> <button id="start">Start Animation</button> <button id="disable">Disable Animations</button> <button id="enable">Enable Animations</button> <div id="box"></div> <script> $(function() { $("#start").click(function() { $("#box").stop(true).css("left", 0).animate({ left: "250px" }, 2000); }); $("#disable").click(function() { jQuery.fx.off = true; // disable all animations $("#box").stop(true).css("left", 0).animate({ left: "250px" }, 2000); }); $("#enable").click(function() { jQuery.fx.off = false; // enable all animations }); }); </script> </body> </html>
Editor Commands
Ctrl
F
Find
Ctrl
G
Find Next
Ctrl
⇧
G
Find Previous
Ctrl
⇧
F
Find & Replace
Ctrl
]
Indent Code Right
Ctrl
[
Indent Code Left
⇧
Tab
Auto Indent Code
Ctrl
/
Line Comment
Ctrl
Alt
/
Block Comment
TutsInsider Actions
Alt
S
Run Code
Ctrl
C
Copy Editor Code
Ctrl
A
Select All Editor Code
Ctrl
S
Save/Download
Ctrl
Alt
X
Rotate
Ctrl
Alt
T
Switch Theme
Ctrl
⇧
C
Open Console
Esc
Close Console