I am trying to create a navigation menu for what I expect to be an extremely long page. I use internal links to make it easier to navigate from one section or another, but the page is designed to allow users to scroll up and down the page several times in one session. I found that internal links are not enough to orient the user with their location on the page, so I added smooth scrolling when I click on the internal link. This has helped some, but I would like to change the style of the internal link if you are right next to it.
As an example, we have five links below. The user is launched in the section that corresponds to link A, so he is bold. When they scroll a little further, they fall into the section that corresponds to link B, so now it's bold. If they jump into the section that corresponds to link E, it will become bold, and the same if they go to link C.
~
Step 1 ............... Step 2 ............... Step 3 .............. .. Step 4
Link A ............... Link A ............... Link A .............. . Link A
Link B ............... Link B ............... Link B .............. . Link B
Link C ............... Link C ............... Link C .............. Link C
Link D ............... Link D ............... Link D .............. Link D
Link E ............... Link E ............... Link E .............. . Link E
~
Is there any way to achieve this?
source share