Plugin Author
malihu
(@malihu)
Hello,
You can’t really do this unless anchors/sections 1 and 3 are next to each other. From what you said I don’t think this is the case, correct?
In general, the links are pointing to id attributes and these are unique (in HTML id attributes should be unique). You can have multiple links for 1 (unique) id but not the other way around.
Unless you wrap the 2 anchors in another element with a new id, a link cannot be highlighted by multiple targets (the same way a link cannot scroll to more than one target).
Plugin’s highlight feature is completely user-centric by design. It basically says to the user “you’re viewing x section”. Saying “you’re viewing x section here” and “you’re viewing x section there” is not its logic because “here” and “there” are 2 different places, thus not the same section (unless wrapped under a parent section).
I hope I’m making sense 🙂
The only way to do what you describe is possibly via some custom javascript that’ll toggle classes on the 2 links according to your theme’s markup and scroll position (and even this may not work well).
Thank you for the nice explanation,
you are correct with your guess about the sections,
i will give up this approach for now since i cannot use javascript well and there is so much other stuff to do on the page^^.
But now i know how it could be done, thanks.
Have a nice day sir.