Scene change to the top of page

I am trying to make a fairly long scrollable mobile page. To have it be less heavy in a single scene, I split it up and tried to put at the bottom of each section a Jump to next scene – with scroll bottom to top transition.
But this transition scrolls to the same position in the next scene which is the bottom of the page rather than the top.
Is there a way to change from scene to scene with a scroll transition but have it scroll to the top of the next scene?

Thanks!

1 Like

If you run this JavaScript function, it will scroll your visitor immediately to position 0 (on the X axis) and 0 (on the Y axis) --> window.scrollTo(0,0);

This could be run either ‘on Scene Load’ for your scenes, or in response to a button action.

2 Likes

Thanks for this 'old' but simple solution. I am using this snippet in a current project and works great. Adding the following gives a nice smooth transition to the top of the page...

window.scrollTo({ top: 0, behavior: 'smooth' })

you may need a polyfill for widely support ...

1 Like

http://iamdustan.com/smoothscroll/

1 Like