<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs
/jquery/1.4.0/jquery.min.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle(5000);
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#test").click(function(){
$(this).fadeOut(4000);
});
});
</script>
</head>
<body>
<div id="test" style="background:yellow;width:200px">CLICK ME AWAY!</div>
<p>If you click on the box above, it will be removed.</p>
</body>
</html>
用fadeout(speed,callback);函数实现淡化消失,用fadeto(speed,callback);函数实现淡化到指定透明度