I am in the process of creating a nav with anchor points on the same page and as we scroll the nav item respective to the element in the browser's viewport gets highlighted or changes color. Here is the example of what I want to achieve https://www.chargebee.com/docs/mail-merge.html
I want to do this for a WordPress based site where we have lots of support articles. Would be grateful for getting some ideas and suggestions.