不知道为什么运行不了,求解答~
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<title>jQuery动画特效</title>
<style>
span{
position:absolute;
width:80px;
height:80px;
border: solid 1px #ccc;
margin: 0px 8px;
background-color: Red;
color:White;
vertical-align:middle
}
</style>
</head>
<body>
<input id="toleft" type="button" value="左移" />
<input id="toright" type="button" value="右移" />
<span></span>
<div></div>
<script>
$("#toleft").bind("click",function(){
$("span").animate({
right:"+=50px";
},3000,function(){
$("div").html('执行完成');
})
});
$("#toright").bind("click",function(){
$("span").animate({
left:"+=50px";
},3000,function(){
$("div").html('执行完成');
})
})
</script>
</body>
</html>