-
-
The main navigation, when using anchor links for a single page website, seem buggy, mainly (but not always) with the first item in the nav list. Generally upon a page refresh it will work when you click, but if you scroll back up to the top and click it again, it does not go to the anchor. Its like it is stuck and thinks it is already at the anchor. When clicking other links in the nav, they will work but clicking the first item doesnt work. Sometimes, the other items will also become “stuck” and the first item works or becomes unstuck. It seems only one link can become “stuck” at a time.
You can replicate this problem at the Conference demo site: https://codeless.co/regn/conference/
Click on the first nav menu item, scroll back up to top, and click it again.
Now sometimes it WILL work but usually doesn’t. Showing this problem on Chrome and Firefox.
-
It does seem to *primarily* (not always) be the FIRST active anchor link on the page (so first ID from the top of the page that is linked to in the nav).
Current work around – adding new menu item that is anchored at top row on page, and targeting it in css to display none. Not ideal but hope this insight helps find the issue!
Thanks
K
-
Hi, I tested it, it seems that the first ‘About’ link is recognized as Active when you scroll back to the top. The script works when the first Menu item is really the first section of the website.
You have fixed it in a good way :) Congrats
-
You must be logged in to reply to this topic.