I need help with sidebar menu

I run a website with adult toys reviews. On every review page I have a sidebar menu that shows the content. How can I make it highlighted while scrolling through the page?
Like, you read the section with “editor’s choice” it is highlighted with some color, then go down to “Most Compact” and it becomes highlighted.

My project: joynights.org

That’s called ScrollSpy.

Are you using a web framework like Bootstrap, JQueryUI or Angular Material?
An example of bootstrap scrollspy can be found here.

However I don’t have experience with building this from scratch… but the window.scrollY contains the vertical scroll position.


I made a Fiddle: https://jsfiddle.net/pieterjandc/rwn51067/8/

Oh great, luckily I use Bootstrap, thanks for help!