无聊看了下 在这个 js 里面
http://js.rrsub.net/js/global.js?v=20160922GLOBAL.JQUERY.Scroll({obj:$('#commentList')});
```js
GLOBAL.JQUERY.Scroll = function(a) {
var b = {
obj: {},
time: 500
};
b = $.extend(b, a);
_obj = b.obj;
if (_obj.outerHeight() <= _obj.parent().outerHeight()) {
return
}
_obj.wrap("<div></div>");
_parent = _obj.parent();
_parent.data("time", b.time);
b.parent = _parent;
scroll_create = function() {
b.parent.css("marginTop", 0).children().eq(1).remove();
$copy = b.parent.children().first().clone();
$copy.prependTo(b.parent);
b.parent.css("marginTop", "-" + $copy.outerHeight() + "px");
b.order = 1
}
;
scroll_autoStart = function(c) {
timer = setInterval(function() {
_obj = c.children().eq(0);
_size = _obj.children().size();
_order = b.order;
c.animate({
marginTop: "+=" + _obj.children().eq(_size - _order).outerHeight() + "px"
}, c.data("time"), function() {
_order = b.order;
if (_order == b.parent.children().eq(0).children().size()) {
scroll_create(b.parent)
} else {
b.order = _order + 1
}
})
}, 3000);
b.parent.data("timer", timer)
}
;
scroll_autoStop = function(c) {
clearTimeout(c.data("timer"))
}
;
_parent.bind("mouseover", function() {
scroll_autoStop(b.parent)
}).bind("mouseout", function() {
scroll_autoStart(b.parent)
});
scroll_create(b.parent);
scroll_autoStart(b.parent)
}
```