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

    (@malihu)

    Hi,

    Your theme handles your menu links and page scrolling internally (the script that does this is: ...themes/bridge/js/default.min.js). It also prevents “Page scroll to id” from auto-enabling smooth scrolling on the links and do its thing.

    To fix this and let “Page scroll to id” handle scrolling with all its features (smooth animation, offset etc.) try the following:

    Go to plugin settings and:

    1. Set “Selector(s) option value to:

    a[rel='m_PageScroll2id'], .menu-item a[href*=#]:not([href=#])

    2. Enable/check “Prevent other scripts from handling plugin’s links” option under “Advanced options”.

    Save changes and test your links. Everything should be working. If not, let me know 🙂

    • This reply was modified 6 years, 9 months ago by malihu.
    • This reply was modified 6 years, 9 months ago by malihu.
    Thread Starter IktanStudio

    (@iktanstudio)

    Thank you so much for responding so quickly! I tried the code you sent me but it didn’t work 🙁 I noticed that if I enter the URL directly to the browser, the offset works fine:

    http://myorthoassist.roostertest3.com/#our-doctors

    It just won’t work when I click the menu, weird! Is it possible to add the offset from the <div> marker maybe?

    Plugin Author malihu

    (@malihu)

    No. The issue is that “Prevent other scripts from handling plugin’s links” option cannot work with your theme’s script (the scrolling and offset works by entering the URL directly because your theme’s script does not prevent it).

    “Prevent other scripts from handling plugin’s links” option attempts to remove javascript click events from other scripts (other than the plugin’s event), but some scripts (like the one in your theme) apply events in way that makes it impossible to remove them by code.

    This means that you have to do it manually (i.e. edit the theme’s script by hand).

    You meed to edit:

    ...themes/bridge/js/default.min.js

    which is minified btw.

    Find the following text:

    $j(document).on("click",".main_menu a,

    and change it to:

    $j(document).on("click",".main_menu a:not(._mPS2id-h),

    Find and replace the exact text!

    Save the file and see if works. If it doesn’t work, try changing it to:

    $j(document).on("click",".main_menu a:not([href*='#']),

    Let me know

    Thread Starter IktanStudio

    (@iktanstudio)

    THANK YOU!!! the first one did the trick 🙂

    Plugin Author malihu

    (@malihu)

    Great! Glad I helped.

    Some themes handle page scrolling in a way that the plugin cannot overwrite their functions. It’s rare but your theme happens to be one of them. Nothing that can’t be fixed though if you know where to look and what to modify 😉

    Thanks a lot for the review!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with Offset’ is closed to new replies.