What's the best way to accomplish a loop of this animation while adding an animation to go back to the top?
$(window).load(function() { $("html, body").animate({ scrollTop: $(document).height() }, 110000, function() { // Animation complete. }); }); Alright! With @void help. I got this working.
var x = 110000; // This is 110sec. var y = 100000; // This is 100sec. $(window).load(function() { $("html, body").animate({ scrollTop: $(document).height() }, x, function() { $("html, body").animate({ scrollTop: (0) }, y); }); setInterval(function(){ $("html, body").animate({ scrollTop: $(document).height() }, x, function() { $("html, body").animate({ scrollTop: (0) }, y); }); }, x+y); }); shoot. This isn't looping...