哪里有错,为什么没反应?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
</head>
<body>
<div id="div1">春季补水节</div>
<input id="btntest1" type="button" value="左移"/>
<input id="btntest2" type="button" value="右移"/>
<div id="tip"></div>
</body>
<script type="text/javascript">
$(function(){
$("#div1").css({"position":"absolute"});
$("#btntest1").bind("click",function(){
$("#div1").animate({
left:"-=50px"
},3000,function(){
$("#tip").html("左移完成");
});
});
$("#btntest1").bind("click",function(){
$("#div1").animate({
left:"+=50px"
},3000,function(){
$("#tip").html("右移完成");
});
});
});
</script>
</html>