How to create a button that is linked to anchor in code?

Hi!

How can I create a button that will take the user to an anchor in a different page? (in code)

the anchor changes!

the page URL & anchor name is saved locally.

thanks for helping me!

the anchor is not fixed, it changes, but the same button is clicked.

Hello. Take a look at this article as a place to start.

If that method won’t work, perhaps you could use a query var on your link and in the destination page check for the var and if it exists, scroll to the anchor.