Cannot get megamenu to work with the zurb_foundation theme

billy.roebuck's picture
billy.roebuck
Wed, 02/13/2013 - 23:05
#1
Cannot get megamenu to work with the zurb_foundation theme

I'm building a new site using the zurb_foundation theme. I can get the megamenu to work using one of the base Drupal themes, but as soon as I switched to my zurb sub-theme, it stops working (e.g. when I hover over menu items, it doesn't expand as expected).

In the Firebug console, I see an error "jQuery is undefined". I read that this may be because the jQuery script is included after this script section.

<code>

<script type="text/javascript">
<!--//--><![CDATA[//><!--
(function($) {
$(document).ready(function(){
var option = Drupal.settings.mmoptions_1;
$("#megamenu-1 > ul").megadrupalMenu(option);
selectnav('mdmegamenu-1', {
label: '--- Table of content ---',//first select field
nested: true,
indent: '-'
});
});
})(jQuery);
//--><!]]>
</script>

</code>

Has anyone else run into this issue? Do you have any ideas on how I can fix this?

Neo's picture
Neo
Thu, 02/14/2013 - 00:23

Hi,

Please try to replace md_megamenu_theme.tpl.php in md_megamenu/templates/menu/ with attach file.

billy.roebuck's picture
billy.roebuck
Thu, 02/14/2013 - 01:43

Thanks Neo, that fixed the problem.

Can I ask what changed in the file to fix the issue?

Cheers

Neo's picture
Neo
Thu, 02/14/2013 - 01:59

Yes, I use right way to add js: drupal_add_js()

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.