JQuery text list scrolling up the code

  • 2020-03-29 23:40:12
  • OfStack

JQuery implementation code is as follows:


<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>


Related articles: