<script> <br />
$(document).ready(function(){<br />
$("button").click(function(){<br />
var div=$(".box");<br />
div.animate({height:'200px',opacity:'0.4'},"slow");<br />
div.animate({width:'200px',opacity:'0.8'},"slow");<br />
div.animate({height:'100px',opacity:'0.4'},"slow");<br />
div.animate({width:'100px',opacity:'0.8'},"slow");<br />
div.animate({right:'100px',opacity:'0.8'},"slow");<br />
div.animate({bottom:'100px',opacity:'0.8'},"slow");<br />
div.animate({left:'100px',opacity:'0.8'},"slow");<br />
div.animate({top:'100px',opacity:'0.8'},"slow",function(){<br />
alert("The paragraph is over");<br />
});<br />
});<br />
});<br />
</script>
<script><br />
$(document).ready(function(){<br />
$("button").click(function(){<br />
var div=$(".box");<br />
div.animate({height:'300px',opacity:'0.4'},"slow");<br />
div.animate({width:'300px',opacity:'0.8'},"slow");<br />
div.animate({height:'100px',opacity:'0.4'},"slow");<br />
div.animate({width:'100px',opacity:'0.8'},"slow",function(){<br />
alert("The paragraph is over");<br />
});<br />
});<br />
});<br />
});<br />
</script>
所谓的回调函数,其实就是在 speed 或 duration 参数可以设置许多不同的值,比如 "slow", "fast", "normal" 或毫秒 后面再添加函数,显示相对应的内容,以提示网民