为何实现不了点击向左向右移动
<!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>
div{
position:absolute;
top:50px;
left:200px;
height:50px;
width:50px;
border:1px solid red;
background-color:red;
}
</style>
</head>
<body>
<div></div>
<input id="left" type="button" value="左移" />
<input id="right" type="button" value="右移" />
<p></p>
<script type="text/javascript">
$( function (){
$("#left").bind("click",function({
$("div").animate({
right: "+=50px"
},3000);
});
$( function (){
$("#right").bind("click",function(){
$("div").animate({
left:"+=50px"
},3000);
});
});
</script>
</body>
</html>