I've made a website that is all on one page. I have a fixed header/navigation bar whose links scroll down to the different sections. I am looking for a way to change the styling for the link whose section you're in by adding a .selected
class to the appropriate link, but I don't know how to get jQuery to recognize which section(s) is currently displayed on the screen.
I have found a plugin called espy (https://github.com/Darsain/espy) , which I think does the trick, but it is a little too advanced for me to get my head around. Is there a simpler way to do this?
I'm pretty new at development, so I hope I have made clear what am I looking for.