[Support request] Table of Contents Anchor Link Positions

Home Forums Support Table of Contents Anchor Link Positions

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #1153107
    Michael

    Hi David,

    I’ve just noticed that the anchor links in my Table of Contents disappear under the menu so that part of the answer text gets obscured initially. Is there any way I can somehow offset this so that when the link in the ToC is clicked it goes directly to the H2 header and keeps it visible (if you know what I mean?)

    https://reclaimdesign-383226.easywp.com/faq

    #1153114
    David
    Staff
    Customer Support

    Hi there,

    You can use the GP Smooth Scroll option:

    https://docs.generatepress.com/article/smooth-scroll/

    It will offset the sticky nav heigh when jumping to a link.

    #1153168
    Michael

    Yeah! Thanks David πŸ™‚ I will look at that now πŸ™‚

    #1153174
    Michael

    Hi David,

    I’ve added class="smooth-scroll" to the anchor links in my ToC on this page:

    https://reclaimdesign-383226.easywp.com/bespoke

    The Anchors are pointing to the IDs attached to each of the H2 sub-headings running down the page, but for some reason the offset and smooth scrolling doesn’t seem to be working? The Smooth Scroll option is checked in the Customizer General settings

    #1153210
    David
    Staff
    Customer Support

    Looks ok to me – maybe browser cache needs clearing ?

    #1153317
    Michael

    Hi David,

    It seems to be cutting off the H2 title and also a couple of the lines of description below. The anchor id is attached to the H2 so my understanding was that it would go to this and be visible? From what I can see the H2 is going right to the top of the page and the menu then covers it (I’ve cleared the cache and it’s still doing that)

    #1153390
    Michael

    Hi David, I’ve been messing around with this for a little while now and it’s definitely not smooth scrolling for me, or allowing for any offset when it jumps to anchor ids. I’ve tried in Firefox and Chrome with the same result. So I must be missing something (again ;))

    #1153478
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It’s working as it should for me: https://www.screencast.com/t/kLEm9dmr

    Our smooth scroll and sticky navigation are built to work together as the video is showing.

    What happens if you use incognito mode in your browser?

    #1153689
    Michael

    Hi Tom,

    That looks like it’s working beautifully. Unfortunately not so for me. This is what I see (recorded on incognito page view on my laptop):

    https://www.screencast.com/t/g26bX7ZGPn

    It jumps to the link ID without scrolling, and the offset is not working like yours either – the header and some of the description get hidden behind the menu.

    I have cleared the browser cache, WordPress cache (the Optimizer plugin is turned off), and tried in different browsers and on my phone (and Nikki’s phone) but we get the same results.

    #1153889
    David
    Staff
    Customer Support

    As Tom and I are both seeing it work correctly, i can only assume its a local issue.
    There is a possibility that your Router or ISP is caching the site. Are you able to check the site using a different network ?

    #1155517
    Michael

    Hi David I’m at a friend’s house testing on their connection on my phone and the Bespoke page ToC is smooth scrolling. Weird. I’m not sure how to check caching settings on our router. But when I get home the day after tomorrow I will look into it and see what I can find on Google. Thanks both for your help and patience.

    #1155573
    David
    Staff
    Customer Support

    If all else fails – turn it off and on again πŸ™‚

    #1158630
    Michael

    Hi David,

    I’m back home and the smooth scroll is still not working on my laptop. The router has been turned on and off. Any other ideas why it’s not working? Really weird. It’s working on my mobile, but not my laptop. I’m running Windows 10 if that makes any difference.

    #1158646
    David
    Staff
    Customer Support

    Couple of things to try:

    1. A different browser.
    2. Disable any Browser extensions such as Ad blockers.
    3. Right Click > Inspect the Page and see if any Red Errors are in the Console.

    Before doing any of this make sure to clear any browser caches, and clear and disable any cache plugins.

    #1158678
    Michael

    Hi David,

    Thanks for the suggestions. I’ve done as you suggested and the same thing happens in Opera and Firefox.

    Here are the console messages in Firefox:

    https://www.dropbox.com/s/e8ok7ctmvib593u/console.jpg?dl=0

Viewing 15 posts - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.