jQuery相同方向连续滚动

animate的回调函数讲解:http://www.w3school.com.cn/jquery/effect_animate.asp

var _scroll=$(selector);
_scroll.animate({marginLeft:"-300px"},1000,function(){
    //把第一个li丢最后面去(这里的滚动方向是向左)
    _scroll.css({marginLeft:0}).find("li:first").appendTo(_scroll);
});



鄂ICP备19018033号-1
0.062614s