对于为什么这个基本的 JQuery 代码不起作用,我非常迷茫,我只是希望这个文本在单击按钮时向右移动 500px。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src = "jquery-2.0.1.js"></script>
<script>
$(document).ready(function(){
$('button').click(function(){
$('div').animate({right:'500px'}, fast);
});
});
</script>
</head>
<body>
<div style = "position: absolute; top: 100px;">
Test Box
</div>
<button>click me</button>
</body>
</html>