Scroll to Anchor Point

Does anyone have recommendations to where I should include the a function to scroll to an anchor point?

The behavior that I’m trying to achieve is…

User expands the side panel,
selects a “section item” to edit…
Side panel switches to that “form” AND the page scrolls to the anchor on the page.