Hello.
I am trying to connect a certain button (at the top of the page) to a specific item in a repeater (way down below)...
While regular Wix anchors are not allowed inside a repeater, I am using the scrollTo function like this:
export function button1_click(event) {
$w("#itemName").scrollTo();
}
Problem is, the repeater items are coming from a DB collection so the items do not appear in the editor (only the first one), which means I don't have a selector to connect the scrollTo with.
I looked at the actual code of the published site and the items' IDs are not something I can relate to in the scrollTo code.
As oppose to the selector that I don't have, I do know the title of each item which is coming from the DB. Is there a way to connect the scrollTo function to that title instead of the the selector of the item box?
Or alternately, is there a better way to achieve this?
Thank you!