我將如何更改下面的頁面和代碼,以便當我的'新聞'P淡出其下面的內容時......平滑地向上滑動而不是跳躍。在jquery中合併效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("a").click(function()
{
$("p").fadeOut(2000);
return false;
});
});
</script>
<style>
p {
position:relative;
width:400px;
height:90px;
background-color:#0099CC;
}
</style>
</head>
<body>
<p>
this is a news box. it will fade out when the x is clicked that is all. (<a href="#">x</a>)
</p>
<br />
does this shift up after fade out.<br />
</body>
</html>
重複的http://stackoverflow.com/questions/734554/jquery-fadeout-then-slideup和可能的重複http://stackoverflow.com/questions/1598129/what-determines-the-execution-order-的的方法合的jquery鏈/ – hasen 2009-10-24 17:35:35