Tagged: anchor
Hello Support,
I have a site with a table of contents at the top that links to the headers in the content of the page by using anchor links. When I click on one of the links, the page scrolls to that header, but there is no offset, so that the header is hidden behind the transparent menu.
I found posts about this issue at https://kriesi.at/support/topic/anchor-link-scroll-position/ and https://kriesi.at/support/topic/fix-scroll-position-anchor-link/, but none of the methods there seem to work for me.
Looking at avia.js, line 631, “$.fn.avia_smoothscroll”, the code there does seem to attempt to calculate an offset, but again, it is not working in my case.
Is there a way to fix this?
I just looked at an older version of my site in a virtual machine that was still running WordPress 4.9. With that, the anchor links are working correctly. When jumping to a header, there is an offset that will place the header under the menu so that it is not hidden.
So this offset calculation seems to have been broken by WordPress 5.
After upgrading my old site to WordPress 5, the offset is now also broken.
Hi,
Sorry for the problem, I had a look at the anchor link you mentioned but it seems to scroll to the correct position on my end. Could you post a screenshot of what you are seeing on your end please?
Best regards,
Rikard
I had deactivated sticky headers as a temporary workaround for the problem.
I turned them on again, so please check the link again (perhaps after clearing your browser cache).
Hi bodo,
Can you disable caching and minification for now? There seems to be an error in the minified file.
Best regards,
Victoria
Thanks, turning of minification of js has fixed it. Thanks for your help.
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon