案例: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
  $("#toggle").on("click",function(){
9
    $("div").toggle(5000);
10
  });
11
  $("#interval").on("click",function(){
12
    jQuery.fx.interval = 500;
13
  });
14
});
15
</script>
16
</head>
17
<body>
18
19
<button id="toggle">切换 div</button>
20
<button id="interval">以较少的帧数来运行动画</button>
21
22
<div style="background:#98bf21;height:100px;width:100px;margin:50px;">
23
</div>
24
25
</body>
26
</html>