Search code examples
phphtmlwordpressmenuelementor

Wordpress anchor menu buggy


I have built my own portfolio website in Wordpress Elementor Pro, and on the portfolio page I have an anchor menu with all my categories of items, like "Logotyper" = Logotypes, "Grafiska profiler" = Graphic profiles, etc. When an anchor link is clicked, the page is supposed to scroll down to that particular section of the portfolio, like a one pager. Although it's sooo buggy. Almost never does it go to the right place. And I have added an effect, that if you're in a section, that active link is supposed to turn light blue, but that is buggy too and the wrong ones light up, or even two at once sometimes, etc.

Last time I made an anchor menu like this it worked perfectly. I don't know what I can do to fix this. Does anyone know the problem? I would really like to be able to send this to the companies I apply for jobs at. Thanks so much in advance!

Here is the link to my portfolio page: https://ida.infid.se/portfolio (You can't see the menu until you scroll down a bit.

(https://i.sstatic.net/1qyfZ.png) [How the menu looks]

I have tried deleting the menu and re-doing it, and I copied my menu from another page that works, but on my page it doesn't. I have checked in the html-code to try to find a solution, but I'm not skilled enough to understand.


Solution

  • Actually, you're not doing anything wrong. When the HTML anchor is clicked, the page is scrolled to the correct area. Meanwhile, lazy images in HTML are loaded. The height of the loaded images causes the page to scroll further down. The simplest solution is to disable lazy loading of images.