1
请帮我纠正我的脚本:http://jsfiddle.net/b36cM/动画jQuery的破
if(direction == -1){
wrapperElements.children(':last').after($('#carousel > ul').children().slice(0, options.rotateBy).clone());
shiftAction();
wrapperElements.children().slice(0, options.rotateBy).remove();
}
else{
// wrapperElements.children(':first').after($('#carousel > ul').children().slice(carouselLength - options.rotateBy, carouselLength).clone());
// shiftAction();
// wrapperElements.children().slice(carouselLength - options.rotateBy, carouselLength).remove();
}
}
function shiftAction(){
console.log(offset);
wrapperElements.animate({
'left': offset
}, options.speed, function(){
running = false;
});
}
}
当#prev
点击动画转移两个元素的左边。我只想顺利地滚动一个项目。