Hi guys.
Ended up using a menu with links and anchors and initializing it using the One Page Navigation-option (doesnt actually make a difference here) and a tiny bit of JS to remove the falsely set ‘current-menu-item’-classes.
The last two menu items are anchors, scrolling there sets the ‘current-menu-item’-class on desktop as expected, but not on mobile. What can I do ? (besides setting the class after clicking programatically, which is rather ugly)
Hi Hei,
Thanks for reaching out.
One page navigation is only applicable for desktop, and the current menu status in one page navigation is triggered by scroll-spy for desktop.
Would you mind providing a sample URL where the one page navigation is working? If you’re referring to the accessible site from your account, make sure the URL as set like #plaeneSection
instead of http://example.com/#plaeneSection
. The script matches the value of link’s href
to the section IDs, adding more than #plaeneSection
will invalidate the matching.
But again, one page navigation isn’t for mobile and it should stay as standard mobile menu, not even the floating/fixed positioned mobile menu. It is the intended design
Thanks!
OK…the spy again.
The last two menu-items work on desktop regardless the the url before the anchor, so your answer doesnt seem accurate.
Would it be so hard to have an option to enable the spy on mobile ?
…for those in need, a really simple fix without mutation observer or other performance loss:
…
Glad you’ve achieved what you need.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.