帮忙看下代码哪里错了,为什么点击按钮没效果呢
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
</head>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$(".left").bind("click",function(){
$("div").animate({
left: "-=50px"
},3000)
})
$(".right").bind("click",function(){
$("div").animate({
left: "+=50px"
},3000)
})
})
</script>
<body>
<div style="width:100px;height:100px;background:red;margin:0 auto;"></div>
<button type="button" class="left" >left</button>
<button type="button" class="right" >right</button>
</body>
</html>