您的位置:首页 > Web前端 > JQuery

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

2018-10-12 14:02 441 查看

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>

您可能感兴趣的文章:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: