Mega Menu width calculations faster load

[ad_1]

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

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 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer