我已经做出了反馈form.i把一些jQuery代码,使其动画,但它不工作...jQuery的动画不工作
feedback_label是button.when我点击它应该移动到留下的BUTTOM 150px.But它不动。 HTML
<div id="form">
<form>
<label for="name" >Name<span class="imp">*</span>:</label><br/><input type="text" id="name" size="50"></input><br/>
<label for="mail" class="l_label">Email Id<span class="imp">*</span>:</label><br/><input type="text" id="name" size="50"></input><br/>
<label for="website" class="l_label">Website<span class="imp">*</span>:</label><br/><input type="text" id="website" size="50"></input><br/>
<label for="feedback">Feedback<span class="imp">*</span>:</label><br/><textarea id="feedback" cols="36" rows="10" ></textarea><br/>
<input type="submit" Value="Send" style="width:280px;height:100px;"/>
</form>
</div>
<div id="feedback_label"><img src="feedback.png"/></div>
<script type="text/javascript">
$("#feedback_label").click(function(){
$("#form").animate({"left": "+=150px"}, "slow");
});
</script>
CSS:
<style type="text/css">
#form
{
border:1px solid black;
width:300px;
text-align:center;
background-color:#353535;
color:#fff;
font-weight:bold;
line-height:30px;
margin-top:130px;
float:left;
}
.imp
{
color:red;
}
#feedback_label
{
margin-top:230px;
float:left;
cursor:pointer;
}
textarea
{
resize:none;
}
</style>
的想法。
你也可以发布你的HTML吗?我的猜测是其中一个选择器(#feedback_label或#form)不正确。它也看起来像你有一个额外的}) - 这也可以解释这个问题,因为这会打破JS。 – DNR 2011-06-01 12:15:11
我已更新我的代码.. – Anish 2011-06-01 12:16:21