I want to add an event listener to an element which gets fired when the corresponding elements is scrolled into the view
How can I add such an event listener to an element? My motive is to highlight elements in nav bar when the page is scrolled into the corresponding section. Thanks