I’m working on the technical documentation page , which requires the implementation of a side-nav. I’ve made a side-nav, but the behavior is a little strange and I can’t figure out why. Here’s a link to the Codepen:
https://codepen.io/aemann2/pen/NWRzpdj
Whenever you click on one of the links in the side-nav, the page scrolls twice: once so that the top of the main content box meets the top of the page, and again within the content box to pull up the selected section.
How do I get prevent the first scroll, and just have the content within the main content box scroll to the selected section?