为什么animate()right参数不生效?
<pre><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<style type="text/css">
#a{
width: 70px;
height: 70px;
left:150px;
position:relative;
border: solid 1px #ccc;
background-color:#f44444;
}
#b
{
width: 70px;
height: 70px;
top:100px;
position:absolute;
border: solid 1px #ccc;
background-color:red;
}
</style>
</head>
<body>
<div id="a">
<div id="b"></div></div>
<script type="text/javascript">
$("body").append("<input id='left' type='button' value='左移' />");
$("body").append(" <input id='right' type='button' value='右移' />");
$("#left").bind("click",function(){
$("#a").animate({
left:"+=50px"
},1000,function(){
$("#b").animate().html("左移完成!")
});
});
$("#right").bind("click",function(){
$("#a").animate({
left:"-=50px"
},1000,function(){
$("#b").animate().html("右移完成!")
});
});
</script>
</body>
</html>
</pre>