Removing #anchor links from changing browser URL when clicked

Very late but this workaround is what I use for my ‘Back to top’ button -

Adding this to the URL of the link takes me to the top without changing the URL

`javascript:window.scrollTo(0, 0);

So if you add the (x, y) coordinates of the section it may work for your needs

Jesus heckin christ.

Thank you so much! How has this been so hard to find… PERFECT