user3391975 user3391975 - 1 year ago 61
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?

Answer Source

Vanilla Javascript:




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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download