I am trying to implement a feature on my website where the section's name is displayed on the dropdown tab using bootstrap scrollspy. Currently, when I scroll, only "section" is visible (which I want to exclude). What I would like is for the current section to be shown in the dropdown bar even when it's not open. For example, when I reach "section 2" while scrolling, I want to see "section 2" displayed in the dropdown bar at the top. Initially, I want the bar to show "section 1."
Here is the code I have so far: https://codepen.io/alyssaalex/pen/rNNGrLy
If anyone can provide assistance with this issue, I would greatly appreciate it. Thank you!