javascript - script to continously scroll to the bottom on a page -
i have page infinite scrolling , wanted performance testing on scrolling endlessly bottom of page.
is there jquery/javascript command allows me scroll continously on page non-stop?
i tried doing following:
(var i=0;i<100;i++) { settimeout(window.scrollto(0,document.body.scrollheight), * 10000); } basically wanted call window.scrollto .. after delayed 5 seconds, , calling again.. infinitely. solution above doesn't work. don't care being hacky, needed work testing.
here simple fiddle:
css:
body{ height:400px; overflow-y:scroll; } js:
var body = $('body'); setinterval(function(){ var pos = div.scrolltop(); div.scrolltop(pos + n); // can have offset }, 200);
Comments
Post a Comment