js conflict, load problem

labman's picture
labman
Wed, 08/30/2017 - 12:26
#1
js conflict, load problem

Hi,

I have Megamenu installed in Drupal 7. I have 2 problems:-

1. The sub-menus do not appear until all the page has loaded. Sometimes it looks like there are no sun-menus if the user goes straight to them.

2. Megamenu does not work on any page where <script src="//www.embed-videos.com/jslib.js"></script> is used.

cindy's picture
cindy
Thu, 08/31/2017 - 00:34

Which version of Megamenu are you using

1. This is not error. Your site needs to be fully loaded first before all sub-menus are loaded. Or do we misunderstand your idea?

2. Please send us your site url to check, and which page does the error occur?

cindy's picture
cindy
Thu, 08/31/2017 - 06:18

Hi,

We try to insert your link js 'www.embed-videos.com/jslib.js' into mega-menu, then we see that not only our mega-menu but also contextual links of blocks at frontend does not work
Mega-menu  is loaded after your site is fully loaded. However, because of the above js, it still takes more time for our megamenu to be loaded and work even after your site is loaded successfully.  

So we suggest you not to use that js
If you still want to use it, you can try this solution: 
open file md_megamenu.module  and search "function _md_awemenu_render "
then replace $("#md-megamenu-%s").aweMenu(%s); with setTimeout(function(){$("#md-megamenu-%s").aweMenu(%s);}, 500);
You can adjust the value of mini second to suit your need 

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.