fontscroll.js 434 B

123456789101112
  1. $.fn.rollByLine = function(millisec){
  2. this.each(function(){
  3. var $ul = $(this).children("ul");
  4. var offset = $ul.children("li").height();
  5. setInterval(function(){
  6. $ul.animate({"margin-top": "-" + offset + "px"},500,function(){
  7. $(this).children("li:first").appendTo($(this));
  8. $(this).css({"margin-top": 0});
  9. });
  10. },millisec);
  11. });
  12. };