案例:jQuery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js">
5
</script>
6
<script>
7
$(document).ready(function(){
8
  $("#disable").click(function(){
9
    jQuery.fx.off = true;
10
  });
11
  $("#enable").click(function(){
12
    jQuery.fx.off = false;
13
  });
14
  $("#toggle").click(function(){
15
    $("div").toggle("slow");
16
  });
17
});
18
</script>
19
</head>
20
<body>
21
22
<button id="disable">jQuery.fx.off = true ( 禁用 )</button>
23
<button id="enable">jQuery.fx.off = false ( 启用 )</button>
24
<br><br>
25
<button id="toggle">切换动画</button>
26
27
<div style="background:#98bf21;height:100px;width:100px;margin:50px;">
28
</div>
29
30
</body>
31
</html>