• Hey there,

    As the title suggests,

    1. I have tried inputting the Menu class under the scroll-to-id menu offset option. Also tried inputting the CSS Classes (optional) / Link Relationship (XFN) under Appearance > Menu.

    It would be best if the offset is set by the header menu. (example: have tried selector “.nav-bar”) However, does not seem to work.

    The offset value seems to be only working for other links besides the Main Menu (Slideshow offset is working).

    2. Do also note that somehow only the Header menu links does not have the smooth scroll animation of the plugin. Whereas the other scroll-to-id links have the animation.

    Is there a reason both of this is happening?
    Please guide me further on this.

    Hope to hear from you soon, thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author malihu

    (@malihu)

    Hi,

    Both issues happen because there’s a script in your theme that hijacks all menu link clicks and prevents “Page scroll to id” (or any other plugin) from doing its thing. This happens only on the menu links (that’s why off menu links work as expected).

    The script that does this is:

    ...themes/partner/style/js/scripts.js

    and the function is on line 520.

    This function applies a click event on the parent li element and prevents any clicks on the link from triggering. Applying the click event on the parent li element means that this cannot be fixed automatically by “Page scroll to id” (via option). You’ll have to do it manually.

    You need to edit the script above and remove/comment line 524:

    e.stopPropagation();

    Save the file.
    This should do the trick. If not, try to remove/comment the whole function (line 520-530).

    In addition, change the offset value (in plugin settings) to:

    .nav-bar:width(>991)

    This will make your offset work correctly on desktop and mobile. Since your mobile menu is not sticky, you don’t want the offset to apply on the hamburger menu. The :width(>991) expression will do just that.

    Hope this helps

Viewing 1 replies (of 1 total)
  • The topic ‘Can’t seem to make the scroll to id work for Menu links’ is closed to new replies.