简单的文字上下滚动

简介:三秒第一个元素执行一次margin-top负高度,然后将第一个元素appendTo添加至末尾

var notices = function(){

    var notice = $("#w-notices"),

        h = notice.height(),

        doplays = function(){

                var ele = notice.find('li').eq(0);

                ele.animate({'margin-top':'-' + h + 'px'},300,function(){

                    ele.appendTo(notice).css('margin-top',0);

                });
        },

        nothanld = setInterval(doplays,3000);


};

 

posted on 2016-01-06 17:00  Cosimo  阅读(193)  评论(0编辑  收藏  举报

导航