JQuery文字列表向上滚动的代码

2019-12-24,,,

jQuery实现代码如下:
复制代码 代码如下:
<script type="text/javascript">
$(function(){
 $("#newly").hover(function(){
  clearInterval(scrtime);
 },function(){
  scrtime=setInterval(function(){
   $ul=$("#newly ul");
   liheight=$ul.find("li:first").height();
   $ul.animate({marginTop:"-10px"},1000,function(){
    $ul.find("li:first").appendTo("#newly ul");
    $ul.find("li:first").hide();
    $ul.css("margin-top","0px");
    $ul.find("li:first").show();
   });
  },4200);
 }).trigger("mouseleave");
});
</script>

您可能感兴趣的文章:

  • 基于Jquery的文字滚动跑马灯插件(一个页面多个滚动区)

《JQuery文字列表向上滚动的代码.doc》

下载本文的Word格式文档,以方便收藏与打印。