- This topic has 26 replies, 3 voices, and was last updated 4 years, 2 months ago by Michael.
-
AuthorPosts
-
February 3, 2020 at 8:17 am #1153107Michael
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?)
February 3, 2020 at 8:21 am #1153114DavidStaffCustomer SupportHi 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.
February 3, 2020 at 9:16 am #1153168MichaelYeah! Thanks David π I will look at that now π
February 3, 2020 at 9:23 am #1153174MichaelHi 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
February 3, 2020 at 10:13 am #1153210DavidStaffCustomer SupportLooks ok to me – maybe browser cache needs clearing ?
February 3, 2020 at 12:18 pm #1153317MichaelHi 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)
February 3, 2020 at 2:04 pm #1153390MichaelHi 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 ;))
February 3, 2020 at 4:50 pm #1153478TomLead DeveloperLead DeveloperHi 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?
February 4, 2020 at 12:30 am #1153689MichaelHi 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.
February 4, 2020 at 4:26 am #1153889DavidStaffCustomer SupportAs 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 ?February 5, 2020 at 6:56 am #1155517MichaelHi 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.
February 5, 2020 at 7:42 am #1155573DavidStaffCustomer SupportIf all else fails – turn it off and on again π
February 8, 2020 at 2:44 am #1158630MichaelHi 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.
February 8, 2020 at 3:22 am #1158646DavidStaffCustomer SupportCouple 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.
February 8, 2020 at 4:24 am #1158678MichaelHi 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:
-
AuthorPosts
- You must be logged in to reply to this topic.