Scroll to element inside a Reusable Element

Hello,

I am using reusable groups, inside these reusables there are buttons with scroll to element actions attached to them.

These scroll to element actions work when a reusable element is displayed on its own page. However, I need to use these reusables inside a page with many other groups/elements. This scroll to function no longer works.

Any ideas of how to resolve this?

Many thanks,
Elliot

Hi Elliot. Its hard to understand your structure based only of that instruction. Can you make a quick loom of it, or show the frontend?

If I got it right, you’ll probably have to change the action of that button to Display data, passing that “thing” to their reusable parent element, and on that parent page, you can use the “scroll to element” action of that previous parent element thing.

Here is your experimental solution,

run javascript , window.scrollTo(0,0) scrolls to the top of the page

. Create reusable set property current scrolling position, fetch that scrolling position from the page you put reusable to
· run javascript , window.scrollTo(0,reusable’s property + distance between element from the top of the reusable)

Note: You can’t change the reusable property that is not the first one, so make

· reusables 1’s property element distance = number, reusables 2nd property page scrolling position, that way when you click an element you can pass the distance too property 1

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