• Resolved ilew

    (@ilew)


    Hi,

    I’ve tried for over an hour to get things set up, but it seems regardless of the value I set the offset too, the plugin results in scrolling over the heading it is meant to show. The offset is now set at 500px but it still overshoots. I have the table of contents plugin installed and I have disabled smooth scrolling in the settings of that plugin and also disabled smoothing scrolling for my theme (EXTRA), however, the issue persists. Any help would be much appreciated as I really can’t figure this out.

    The table of contents can be found at the beginning of any guide (but it needs expanding to see the various links to click).

    Kind regards

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ilew

    (@ilew)

    On further testing, it seems if I type in the URL with the #section_title included and click refresh, it scrolls to the right location (taking into account the offset). However, if I click the link direct from the contents menu within the article it seems to disregard the offset and overshoot. Any idea how I can resolve this?

    Kind regards

    Plugin Author malihu

    (@malihu)

    Hello,

    Sorry for the late reply (just got back from summer vacations).

    I checked your page and it seems to work for me. Did you solve the offset issue? Did you use the “Prevent other scripts from handling plugin’s links” option?

    Let me know ??

    Thread Starter ilew

    (@ilew)

    Hi @malihu,

    It is still overshooting, meaning the header/menu covers the text you are scrolling to. Changing the pixel offset doesn’t seem to have any effect. I have used the “Prevent other scripts” option also, however that doesn’t fix the issue.

    You can see here, by expanding the table of contents at the start of the article and choosing a section to scroll to https://geekymedics.com/how-to-take-a-medication-history/

    Any help would be really appreciated.

    Kind regards

    Lewis

    Plugin Author malihu

    (@malihu)

    Oh I see. I was seeing the page in your first post.

    OK I checked /how-to-take-a-medication-history/ and the plugin is not activated on the custom TOC (table of contents) links.

    You just need to go to “Page scroll to id” settings and change the “Selector(s)” option value to:

    a[href*=#]:not([href=#])

    This will enable the plugin on all links pointing to same-page anchors.

    Save changes and test your links.

    If you don’t want to have the plugin enabled on all such links, you can change the “Selector(s)” option to:

    a[rel='m_PageScroll2id'], .ez-toc-list a

    This will enable the plugin only on your TOC links (in addition to the default selector).

    That’s it. Let me know if it works

    Thread Starter ilew

    (@ilew)

    That’s worked! Thanks so much for your help, you’re awesome!

    Plugin Author malihu

    (@malihu)

    You’re welcome ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Despite changing offset, still scrolls to wrong location on page’ is closed to new replies.