I have a website with one big horizontal div. It automatically scrolls vertically and horizontally onload (I used this javascript as discussed here: smooth auto scroll by using javascript):
function pageScroll() {
window.scrollBy(10,-10); // horizontal and vertical scroll increments
scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
}
What I would like to know but can't figure out: is it possible to toggle this function? I would like that once the page automatically scrolled to the end of the page, that it goes back up and back to the left again. So that it goes back and forth, up and down forever.
All help is very appreciated, thanks in advance!