infinity vertical scroller

armydude08

New Member
I have a vertical scrolling script that works nicely for me, but the problem is that it stops after some time. How to modify the script so that it will keep scrolling infinitely from top to last again and again?
Here is the code:\[code\]<html><head><style type="text/css">.frame {font:12px arial;width:200;height:300;border:none;overflow: hidden;border:1px solid black;padding:5;}</style><script language="javascript">i = 0var speed = 1function scroll() {i = i + speedvar div = document.getElementById("news")div.scrollTop = iif (i > div.scrollHeight - 160) {i = 0}t1=setTimeout("scroll()",100)}</script></head><body onload="scroll()"><div class="frame" id="news" onmouseover="clearTimeout(t1)" onmouseout="scroll()" >Some Text text 1<br>Some Text text 2<br>Some Text text 3<br>Some Text text 4<br>Some Text text 5<br>Some Text text 6<br>Some Text text 7<br>Some Text text 8<br>Some Text text 9<br>Some Text text 10<br>Some Text text 11<br>Some Text text 12<br>Some Text text 13<br>Some Text text 14<br>Some Text text 15<br>Some Text text 16<br>Some Text text 17<br>Some Text text 18<br>Some Text text 19<br>Some Text text 20<br>Some Text text 21<br></div></body></html>\[/code\]
 
Back
Top