• Resolved masterredstorm

    (@masterredstorm)


    Hello,

    first off: this is a really really nice plugin!
    and now for my question^^:

    My menu structure:
    item1 – item2 – item3

    My page structure:
    anchor 1
    stuff
    anchor 2
    stuff
    anchor 3

    My problem:
    Normal highlighting working well, but i want to highlight item1 at anchor1 AND anchor3.
    So if you scroll down first you geht item1 highlighted then item2 and after that item1 again.
    I would be happy for advice, thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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).

    Thread Starter masterredstorm

    (@masterredstorm)

    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.

    Plugin Author malihu

    (@malihu)

    You’re welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Highlight other menu item’ is closed to new replies.