公告栏文字上下滚动效果

var textRoll=function(){
        var length = $('.jcPrice1 ul li').length;
        if(length>=4){
            $('.jcPrice1 ul li:last')
   .css({'marginTop':'0rem','opacity': '0'})
   .insertBefore('.jcPrice1 ul li:first')
   .animate({'height':'0rem','opacity': '0'}, 'slow',
            function() { $(this).removeAttr('style');}
            );
        }
    };
    $(function() {
        //触发上下文字滚动事件
        var roll = setInterval('textRoll()', 4000);
    });

你可能感兴趣的:(公告栏文字上下滚动)