Site logo

Archived topic

Hamburger menu sometimes doesn't open

5 replies · Started by Simon on January 7, 2021

Viewing posts 1–6 of 6

Happy New Year!

I have a site where the hamburger menu doesn't always load. Sometimes, there is no response, sometimes a dotted-outline box appears around it - but the menu doesn't work. Sometimes it works after a couple of clicks. At first I wondered if it was a connection issue, but have tried it from multiple, known good connected places guess I have to rule that out? I should add, when it does that there is never an issue with any other part of the site, or from table and desktop view.
Its hosted via CDN, so I wondered if it was removing / delaying some type of dependency necessary.

I managed to capture it here, if it helps.
Thanks!

https://drive.google.com/file/d/1peuPE4fabEK3XIObo9yvYPF1mjBgh_yE/view?usp=sharing

Hi there,

looks like your site is loading a bunch of deferred Javascript which comes in way after the initial site load, until those scripts are loaded they are blocking the rest of the JS on the site including the script for the mobile menu....

Hi David
Thank you for replying to me so quickly. Much appreciated.
Would you know the name of the scripts being called so I can ask they are excluded from the CDN?
With best wishes

Hi,

Would you know the name of the scripts being called so I can ask they are excluded from the CDN?

To be on the safe side, you should exclude all the .js files from your site's /themes/generatepress and /plugins/gp-premium.

But if you must specify, you can find the filenames here:
https://github.com/tomusborne/generatepress/tree/master/assets/js

Exclude these(path = generatepress/assets/js/): main.min.js, main.js, menu.js, menu.min.js

Thank you, Elvin! I added those directories to the deferred javascript exclusion and all is well!

Best wishes
Simon

No problem. :)

This archived topic is closed to new replies.