Javascript error for DC Megamenu?
Permalink Browser Info Environment
I am trying to release my website today, but as soon as I enabled the cache on my site I started receiving JSerrors on DCMegaMenu. I've since cleared cache multiple times in C5 and in all my browsers but I am getting odd menu behavior. The second layer of menu is displaying all the time.
Here is the error I am receiving:
Uncaught TypeError: $(...).dcMegaMenu is not a function
at VM173:1325
at dispatch (jquery.js:4)
at r.handle (jquery.js:4)
Here is the VM content:
$(window).load(function() {
$('#mega-menuh-594').fadeIn('fast');
$('#mega-menuh-594').dcMegaMenu({
rowItems: '4',
speed: 200,
effect: 'fade',
event: Modernizr.touch ? 'click' : 'hover',
navigateOnCollapse: Modernizr.touch ? true : '1',
direction: 'down',
fullWidth: false
});
$('#mega-menuh-594 .sub-container').hide();
});
Additionaly is the error in Safari's debugger:
$('#mega-menuh-594').dcMegaMenu is not a function. (In '$('#mega-menuh-594').dcMegaMenu', '$('#mega-menuh-594').dcMegaMenu' is undefined)
Attaches is a screenshot of whats happening. You can see it at
http://dev.bayleaf.org
Disabling site cache corrects the issue.
Any pointers would be appreciated. I really need to release today.
thanks
Here is the error I am receiving:
Uncaught TypeError: $(...).dcMegaMenu is not a function
at VM173:1325
at dispatch (jquery.js:4)
at r.handle (jquery.js:4)
Here is the VM content:
$(window).load(function() {
$('#mega-menuh-594').fadeIn('fast');
$('#mega-menuh-594').dcMegaMenu({
rowItems: '4',
speed: 200,
effect: 'fade',
event: Modernizr.touch ? 'click' : 'hover',
navigateOnCollapse: Modernizr.touch ? true : '1',
direction: 'down',
fullWidth: false
});
$('#mega-menuh-594 .sub-container').hide();
});
Additionaly is the error in Safari's debugger:
$('#mega-menuh-594').dcMegaMenu is not a function. (In '$('#mega-menuh-594').dcMegaMenu', '$('#mega-menuh-594').dcMegaMenu' is undefined)
Attaches is a screenshot of whats happening. You can see it at
http://dev.bayleaf.org
Disabling site cache corrects the issue.
Any pointers would be appreciated. I really need to release today.
thanks
Type: | Ticket |
---|---|
Status: | Archived |
Apologies for the delay in getting back to you, and thanks for your patience.
It sounds like the required Javascript file for the Mega Menu isn't being loaded. This is unlikely to be anything to do on the Mega Menu end as it complies with the best practices for C5. My guess is something in the C5 database has gone pear-shaped. If using a server level caching system (like Varnish or APC) it could help to try clearing those.
Sometimes C5 doesn't do a great job in sorting the loading order of JS files, so that could also be a cause.
Hope this helps.
JB
It sounds like the required Javascript file for the Mega Menu isn't being loaded. This is unlikely to be anything to do on the Mega Menu end as it complies with the best practices for C5. My guess is something in the C5 database has gone pear-shaped. If using a server level caching system (like Varnish or APC) it could help to try clearing those.
Sometimes C5 doesn't do a great job in sorting the loading order of JS files, so that could also be a cause.
Hope this helps.
JB
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
thanks