1

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.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
Fasih
  • 11
  • 2
  • Since this is tagged bootstrap, you might want to use [scrollspy](https://getbootstrap.com/docs/4.1/components/scrollspy/) – msg Apr 25 '20 at 00:43

1 Answers1

2

In JS only you could use Intersection Observer to know when an element is in view.