Вот мой CSS:jQuery .animate идет неправильное направление почему?
.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"}
, но в действии он идет прямо, почему это случилось?
форматировать Ваш код, прежде чем отправлять его здесь. –