Hey, I’m currently building a site on which several dynamic pages are included. On each of the item pages I want to use a button to scroll down to a contact section. It works without problems on the “normal” pages, however on the dynamic item pages I can’t connect the button to the anchor as I can’t choose the item page or the dynamic page in the link settings under “anchor”.
I tried with some basic velo code as well. It didn’t work.
$w("#button").onClick(() => {
// Replace "anchor" with the ID of the anchor element// that you want to jump to
const anchor = $w("#anchor");
anchor.scrollIntoView();
});
It gives me the following error message
Property ‘scrollIntoView’ does not exist on type ‘HiddenCollapsedElement’
even though the section is neither hidden nor collapsed.
Does anyone have a solution for this?
Thanks a lot!!