Today I wrote a simple JavaScript that scrolls down the page slowly for a certain amount of time, and then goes back up to the top of the page and starts scrolling again.
<html>
<head>
<script type="text/javascript">
scrolldelay = "";
function pageScroll() {
window.scrollBy(0,1); //Scroll 1px. Makes it smoother
scrolldelay = setTimeout('pageScroll()',50); //Scroll every 50ms
}
function startScroll() {
window.scroll(0,0);
clearTimeout(scrolldelay);
pageScroll();
scrolldelay = setTimeout('startScroll()',20000); //Repeat every 20 seconds
}
</script>
</head>
<body onLoad="startScroll()">
Put body text here
</body>
</html>
I used this code for a client who wanted a web page to be displayed publicly without needing to have a user do the work.
Let me know if you found this helpful!
