Chrome Anchor Link Not Working Fix

One of my single page sites that had been live for months with no changes suddenly had the menu stop functioning in Chrome only.  I can’t find an exact reason for the break, but I did find a cross-browser javascript solve that fixes the issue nicely. Just add the snippet to your site and you should be all set. This fix requires jquery so you’ll need to be sure to convert it to VanillaJS if you aren’t using it.

 


Comments
Harvey Specter
Posted at 6:29 pm October 26, 2017
Alexis Hawke
Reply
Author

Thank you so much for this fix – I had two sites with the same issue – only occurred on single-page sites where an anchor was used. Your fix sure was a life-saver! Thank you.

    Harvey Specter
    Posted at 6:34 pm October 26, 2017
    Greg
    Reply
    Author

    Glad it helped! I still can’t find the root cause of the issue which is frustrating me to no end.

Harvey Specter
Posted at 4:51 pm November 2, 2017
Cavallone
Reply
Author

Thank you! It worked for me even if i don’t understand what script does …:-)

Harvey Specter
Posted at 7:42 pm November 6, 2017
Andre Castro
Reply
Author

Thank you! It worked fine!

    Harvey Specter
    Posted at 2:23 pm November 7, 2017
    Greg
    Reply
    Author

    Glad it helped, Andre!

Harvey Specter
Posted at 4:21 pm December 6, 2017
Pete
Reply
Author

Hey it still doesn’t seem to work on my android chrome. Any ideas where the script should be placed?

    Harvey Specter
    Posted at 4:29 pm December 6, 2017
    Greg
    Reply
    Author

    Hi Pete,

    You can put it anywhere in your code after your reference to the jquery library. I just tested on Android Chrome and it’s working for me. If you can share a link, I’ll be happy to try and help you troubleshoot.

Leave a Reply