文字滚动效果

在网络上找到的这个效果,核心代码:

  1. <script type="text/javascript">
  2.     function autoScroll(obj) {
  3.         $(obj).find("ul").animate({
  4.             marginTop: "-39px"
  5.         },
  6.         500,
  7.         function() {
  8.             $(this).css({
  9.                 marginTop: "0px"
  10.             }).find("li:first").appendTo(this);
  11.         })
  12.     }
  13.     $(function() {
  14.         setInterval('autoScroll(".maquee")', 3000);
  15.         setInterval('autoScroll(".apple")', 2000);
  16.     })
  17. </script>

演示Demo