Tagged: anchor
-
AuthorPosts
-
April 12, 2019 at 9:23 am #1089978
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?-
This topic was modified 6 years, 6 months ago by
bodo.
April 12, 2019 at 10:32 am #1090004I 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.-
This reply was modified 6 years, 6 months ago by
bodo.
April 13, 2019 at 6:16 am #1090279Hi,
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,
RikardApril 13, 2019 at 8:39 am #1090307I 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).April 14, 2019 at 4:14 pm #1090650Hi bodo,
Can you disable caching and minification for now? There seems to be an error in the minified file.
Best regards,
VictoriaApril 17, 2019 at 2:15 pm #1092017Thanks, turning of minification of js has fixed it. Thanks for your help.
April 18, 2019 at 1:26 am #1092210Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
This topic was modified 6 years, 6 months ago by
-
AuthorPosts
- The topic ‘Jump to header with anchor link broken after upgrade to WordPress 5’ is closed to new replies.
