0

So this is one of those questions that seems simple but than it doesn't. I have a webpage containing over 200.000 names of people that i load in using node.js and line-by-line. I want the page to slowely scroll down. Think intro crawler from starwars style. but than just names going from bottom of page to top. There are a lot of solutions for automatic scrolling online but all i found needed or a fixed height or a fixed duration for the animation. Both are ofcourse not possibe because the names are still being loaded while scrolling. What is the best way to do this??

Please help me :)

1 Answers1

0

You can create the animation in js yourself:

function autoScroll() {
    var page = $("html, body");
    page.scrollTop(page.scrollTop()+1);
    setTimeout(function() {
        autoScroll();
    },5);
}

autoScroll();

Then you may add some checks (comparing the height of your page and the scroll position) to ensure there are still names loaded and stop when that's not the case anymore, but that's the idea.

Ben
  • 624
  • 6
  • 16