How do I get my buttons to SNAP to an anchor on a page instead of the scrolling effect?

I have buttons on a page that are linked to anchors far down the page. Currently, when the button is clicked it rapidly scrolls through to the page to reach the anchor. However, it is a very long page and it doesn’t look clean having the scroll effect go through the whole page to reach the bottom. I would like that button to SNAP to that anchor point directly, instead of scrolling through. What code do I have to edit to make that work? Thanks!