Scroll to top from a reusable element

How to scroll to top" of a page triggered from a reusable element? Thanks!

If the RE is itself on the top of the page then it’s as easy as scrolling to the top of the reusable element…

Otherwise some simple javascript will do the job: window.scrollTo(0,0) - or if you want the scroll to animate use: window.scrollTo({top:0, left:0, behavior: 'smooth'})

2 Likes

You are the savior here @adamhholmes! If there is such a badge, you deserve it :smiley:

Ah, to make it interesting enough here, the RG is Floating type… -.-

Could you please remind us here how to inject the javascript in such case, I assume we can’t use the traditional medical ways… :smiley:

Could you please remind us here how to inject the javascript in such case,

Install the ToolBox plugin, then just use the plugin action ‘Run Javascript’ and type the code:

4 Likes

Thanks @adamhholmes It works like a charm!

https://www.imdb.com/title/tt12005128

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