Support » Plugin: Page scroll to id » Offset conflict with theme

  • Hello,
    i have some pages in menu with submenu pages and when i click on one of them page scroll to this anchor but when i click on another in the same submenu it goes wrong (without offset). I need to click one more time on the same submenu page and then i goes ok (with offset).
    I tried to use option “Prevent other scripts from handling plugin’s links (if possible)” but it didn’t helped. Do you have any suggestions what can help?
    Thank you.
    Filip

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

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

    (@malihu)

    Hello,

    I just checked your site and the issue you’re having is due to your theme.

    The theme seems to handle page scrolling and all links that point to sections within the page. The script that does this is this:

    ...themes/milano/js/plugins.js

    This script prevents “Page scroll to id” from doing its thing (scrolling the page, applying the offset etc.), so the issue(s) you describe (e.g. 2 clicks to go to the correct position) are coming from this script.

    You correctly enabled the “Prevent other scripts from handling plugin’s links” option in plugin settings, but unfortunately it doesn’t work in your case (this happens because of the way the theme script is coded).

    The only thing you can do is to see if your theme has an option to disable page smooth scrolling, in order to let “Page scroll to id” handle this functionality (maybe you need to contact the theme developer and ask if such option exists or how to disable it).

    If no such option exists (and you still want to use “Page scroll to id” with all its features), you’d need to manually edit the code in plugins.js, which is not really the right way to go about it, because you’d have to do it every time you update the theme.

    Not sure if the “Milano” theme provides a way to disable its smooth scrolling feature but unfortunately some themes do not have such option and on top of that, their code is made in such way, that it’s impossible for other scripts from bypassing it.

    Hope this helps

Viewing 1 replies (of 1 total)
  • The topic ‘Offset conflict with theme’ is closed to new replies.