How to "scroll to" within a SPA?

Sup everyone,
I need to scroll within a SPA whenever the user selects a page in a floating sidebar menu.
Bothers me that it doesn’t go to the start of the page.

The difficulty is that I can’t work from workflow of a reusable floating sidebar menu because it doesn’t display elements to reference to whenever loading a new page.

How is it done?

No elemento reutilizavel voce pode criar uma ação de que toda a vez que vc clicar em um link ou botão pra mudar de “pagina”, rolar até o mesmo elemento

e tambem pode ajustar a posição com o Offset (pixels) com valor positivo ou negativo ex: -200

Rather than scroll to entry > go to page , Do run java script > go to page. Java script will be window.scrollTo(0,0) . Install toolbox plugin if you dont have , you will eventually need it .

This topic was automatically closed after 70 days. New replies are no longer allowed.