var total_height = 0; $$('div#auto-scroll ul li').each( function(el){ if(el.get('id') != 'repeat'){ var height = el.getStyle('height').toInt(); total_height = total_height + height; } }); $$('#auto-scroll ul').setStyle('height',total_height); total_height = total_height * -1; var myTween = new Fx.Tween($$('#auto-scroll ul')[0], { duration: 50000, transition: 'linear' }); myTween.start('top',total_height); $('auto-scroll').addEvents({'mouseover' : function(el){ myTween.cancel(); }, 'mouseleave':function(){ myTween.start('top',total_height); }});