Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Originally, I actually implemented this kind of behaviour where a menu item is highlighted based on which section of the homepage the user is reading. However, I didn't commit my code for this feature because it cannot be 100% accurate. It will fail at the end of the page (the Contact widget will often not be highlighted since it has a short height). You cannot see the failure case in your example because your example sets each section as the screen height.