@dwklink It sounds like you’ll probably be better off using wixWindow.scrollTo(x, y).
You won’t have to worry about using anchors at all, and you should be able to plug it in neatly using your current conditional statements. Just make sure to import the wix-window API.