• Thanks for the great plugin!

    I’m trying to highlight top menu items when scrolling by sections on one page. Last Contact section (footer) is not highlighting the last menu Contact item, when it takes less than some 40% of browser window’s height.

    Tried to enable “Highlight by next target” and it helps, but then top sections are highlighting wrong items on a big screen.

    Is it possible to resolve such a problem, except adding more space to the footer’s bottom?

    P.S. If highlight classes where changing in parent li and not inside li > a of wp menu, it was possible to resolve this with CSS. or maybe there is a way to copy dynamic highlight classes to parent li?

    Another question: I’ve saw your classes for custom speed to add to the menu. They worked great. But can’t find any option for offset with classes for wp menus. Is it possible somehow?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    Can you post your site/page URL so I can check what happens?

    Do you have “Allow only one highlighted element at a time” option enabled? Maybe you can use the mPS2id-highlight-first or mPS2id-highlight-last classes to highlight the links?

    Link-specific offsets are currently supported only via the data-ps2id-offset attribute (not sure if it fits your needs?). If I could see your page, I’d probably be able to suggest another way to solve the issue.

    Thread Starter Webprom Design

    (@webprom)

    HI!

    Yes, I tried every option and combinations.

    mPS2id-highlight-last doesn’t work at all, seems to me, I tried mPS2id-highlight-first but since classes are only inside li > a in the WordPress menus, can’t select right thing.

    How can I send you url, that only you could see? ??

    As you know it’s hard to add data attribute to wp menus ??

    Thread Starter Webprom Design

    (@webprom)

    If mPS2id-highlight-first was adding only while there are several links with mPS2id-highlight class, maybe more options were available from css.

    Plugin Author malihu

    (@malihu)

    Thread Starter Webprom Design

    (@webprom)

    sent, thanks!

    Thread Starter Webprom Design

    (@webprom)

    Hi!

    Sorry, I don’t remember already what it was, the author helped me with it. But here’re my current settings: https://1drv.ms/u/s!AuVV2tr9Z0JhivJFAaujCpAicztUPg?e=puPkoQ

    Hope it’ll help.

    Thread Starter Webprom Design

    (@webprom)

    It’s maybe in excluded selectors:

    a[href^=’#tab-‘], a[href^=’#tabs-‘], a[data-toggle]:not([data-toggle=’tooltip’]), a[data-slide], a[data-vc-tabs], a[data-vc-accordion]

    Or highlight selctors:
    .main-navigation .menu > li > a, .sticky-inv-menu a

    Also, check that you have only 1 selector with corresponding class, I think the problem was there…

    Good luck!

    Plugin Author malihu

    (@malihu)

    @arnerobot Hello,

    This happens because your “Kontakt” section is short enough that when you scroll to it (i.e. to the very bottom), both “Bücher” and “Kontakt” sections are within the viewers visible field (i.e. both sections are within the viewport, almost 50/50 on a 1920×1080 viewport).

    I see that you have enabled the “Allow only one highlighted element at a time” option in plugin settings. Try this:

    Disable the “Allow only one highlighted element at a time” option and try using a different selector in your CSS, e.g. instead of:

    .menupoint-highlight {
        background-color: #f8f6f6;
    }

    Use:

    .menupoint-highlight-last {
        background-color: #f8f6f6;
    }

    Let me know

    Hello @malihu and @webprom.

    Thanks a lot for your generous help! I actually solved the issue by switching off the “Allow only one highlighted element at a time”, switching on the “Highlight by next target” option and using

    .menupoint-highlight-first {
        background-color: #f8f6f6;
    }

    as my highlighting style. Everything works fine now.

    Thanks again and cheers,
    Arne

    • This reply was modified 5 years, 3 months ago by Arne Teubel.
    Plugin Author malihu

    (@malihu)

    @arnerobot Awesome ??
    Thanks for posting your solution. Marking this as resolved.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Last section on page not being highlighted in the menu’ is closed to new replies.