How to scroll to an anchor within same page using Corvid code?

Hi, becasue I’m unable to use new WIX multilingual app in my website, I have written a code for headers buttons that are common for all pages in different languages.

For example English page I should be able to scroll down to different anchors defined in that page when I click any of the corrosponding buttons, so I have written the below code, but it doesn’t seems to be working properly.

 import wixUsers from 'wix-users'; 
 import wixData from 'wix-data'; 
 import wixLocation from 'wix-location'; 
 
 export function Home_click(event) 
  {
    wixLocation.to(`/ `);
  }
  
 export function About_click(event , $w) 
  {
    $w("#anchor4").scrollTo();
  }
  

Any idea what am doing wrong with my code?

https://support.wix.com/en/article/linking-an-element-to-an-anchor
https://www.wix.com/corvid/reference/$w.Anchor.html
https://www.wix.com/corvid/forum/community-discussion/how-do-i-pass-an-anchor-on-an-element-link
https://www.wix.com/corvid/forum/community-discussion/load-page-then-autoscroll-to-anchor

@givemeawhisky Thanks it worked out for me.

Actually I just noticed that my buttons name are not the same as the one mentioned in the properties panel, so my above code was correct.

Thanks again :slight_smile: