ここに私のCSSがあります:
.animate-rectangle {
background-color:#0F0;
border: 1px solid #FFF;
float:left;
position:absolute;
width:100px;
height:100px;
}
そしてjQueryコード:
<!--Jquery Code to Animate Rectangle from Left to Right-->
$(document).ready(function () {
var windo_width = $(document).width() - 300;
$("#reset").click(function () {
$(".animate-rectangle").animate({
"left": "100px"
}, "slow");
});
$("#MoveRight").click(function () {
$(".animate-rectangle").animate({
"left": "+=" + windo_width
}, "slow");
});
});
それが宣言しているjQueryコードを見てください。animate({"left":"100px"}
しかし実際には、なぜこれが起こったのでしょうか?