jQuery动画

引用:

jQuery 动画的问题

许多 jQuery 函数涉及动画。这些函数也许会将 speedduration 作为可选参数。

例子:$("p").hide("slow")

speedduration 参数可以设置许多不同的值,比如 "slow", "fast", "normal" 或毫秒。

实例

$("button").click(function(){
$("p").hide(1000);
});
-----------------------------------------------
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
  $("p").hide(1000);
  });
});
</script>
</head>
<body>
<button type="button">隐藏</button>
<p>This is a paragraph with little content.</p>
<p>This is another small paragraph.</p>
</body>
</html>
posted @ 2011-07-20 18:12  镇水古月  阅读(389)  评论(1编辑  收藏  举报