• Resolved prokops

    (@prokops)


    Hi there!

    Our mega menu loads in with the standard width of the parent element, making everything inside squished.

    A few seconds later, the calculated “outer width” selector calculation kicks in and the menu gets resized to whatever page is: https://paste.pics/OME53

    I’d like to speed this up, so I eliminate the few seconds wait time. Can I move the calculation to top of header somehow or use other tools make the process a priority task?

    I tried to search for this topic but I am unsure of what wording to use.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi prokops,

    The problem is the calculations can only be performed once the page is fully loaded and everything on the page is the size its supposed to be, so no matter where the JS is loaded, we still need to wait for all of the CSS to be loaded too. Only then can we reliably get the sizes of page elements.

    The work around I can think of would be to prevent the sub menus from appearing at all until the JavaScript has loaded. You should be able to do that with some custom CSS along the lines of:

    .mega-no-js * {
    pointer-events: none !important;
    }

    Regards,
    Tom

    Thread Starter prokops

    (@prokops)

    I think this does not help the core issue of the menu being unhelpful to customers.

    We are trying a different route and centering the main menu within a 100% width element. This sidesteps the need to resize the menu with only slight design changes.

    Thanks for the interest ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mega Menu width calculations faster load’ is closed to new replies.