简介:三秒第一个元素执行一次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); };
时间: 2024-10-13 00:04:32