[Resolved] Hamburger menu sometimes doesn’t open

Home Forums Support [Resolved] Hamburger menu sometimes doesn’t open

Home Forums Support Hamburger menu sometimes doesn’t open

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1609673
    Simon

    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

    #1609762
    David
    Staff
    Customer Support

    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….

    #1610123
    Simon

    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

    #1610190
    Elvin
    Staff
    Customer Support

    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

    A wise man once said:
    "Have you cleared your cache?"

    #1610655
    Simon

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

    Best wishes
    Simon

    #1613718
    Elvin
    Staff
    Customer Support

    No problem. 🙂

    A wise man once said:
    "Have you cleared your cache?"

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.