Linking to another section on the same page within a code block

Thank you so much for this! This solution makes sense. I tried giving the anchor link an ID and using that as the click but wasn’t able to get it to work. To be honest my js/jquery is pretty rusty these days. I do have a RM nav link that already scrolls to that section so I thought I could try having the anchor link just trigger a click of that element, but wasn’t sure if I would use the data-id of the div container, or the data-page-id of the anchor link, or something else to target that link.