In order to make a Nice Menu, I created a menu like this:
My Menu
- First link
- Second link
- Third link
The menu works perfectly fine, but I also had to fill in a link for the 'My Menu' (I've set it to the frontpage). However, I'd like the parent link to be linked to nowhere. How can I do that?
This is the relevant code for the menu's parent:
<div id="block-nice-menus-2">
<ul id="nice-menu-2">
<li class="menu__item">
<a class="menu__link menu__link" href="/mysite/">
My Menu
</a>
</li>
</ul>
</div>
Note: At first, I couldn't get the code from the accepted answer working, because I forgot to load my theme's MYTHEME.js
file. After reading this, I learned that one can do that by adding scripts[] = MYTHEME.js
to the MYTHEME.info
file.