昨天做了一个例子,代码很简单
Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
function Test()
{
$('#div1').hide("slow");
}
</script>
</HEAD>
<BODY>
<input type="button" value="测试" onclick="Test()"/>
<div style="width:700px;height:400px;background-color:red" id="div1">
div1
</div>
<div style="width:700px;height:400px;background-color:green" id="div2">
div2
</div>
</BODY>
</HTML>
注: 显示没有问题 ,就隐藏时会“轻微抖动”