user3391975 user3391975 - 10 months ago 31
Javascript Question

How to stay at pagebottom (with javascript) while loading other page sections above?

I will have a onepager with different sections. I want to start with the last section (bottom of the page)and do load the other sections content with AJAX after the last section has been loaded.

The window does not stay with the last section. After loading the other sections content it follows them up.
How could I stay on the last section as long as I do not start scrolling up?


Vanilla Javascript:




Call this whenever you require to auto-scroll to page bottom.