Last active
September 30, 2015 08:54
-
-
Save raf924/b524bee556a5120bd831 to your computer and use it in GitHub Desktop.
A simple autoscroller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var interval = setInterval(function() { | |
if (document.body.scrollTop < (scrollBy(0,1),document.body.scrollTop)) { //test if body can be scrolled, tweak the number to change scroll speed | |
//Do whatever | |
} else { | |
clearInterval(interval); //stop scrolling | |
//jQuery("#nextNav").parent()[0].click(); | |
} | |
}, 10);// Tweak that number to change scroll speed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment