<script language=javascript> jQuery("#menu-firstmenu li:has(ul.sub-menu)").hover(function () { jQuery(this).children("a").click(function () { return false; }); }); </script>
<script language=javascript> jQuery("#menu-firstmenu li:has(ul.sub-menu)").hover(function () { jQuery(this).children("a").click(function () { return false; }); }); </script>
Hi Kapil,
Thanks so much for this, it’s a great little plugin. I was wondering if you could help me out though. I have menus that look like this
Community –
Ontario
North Bay
I installed your plugin so that “Community” would not be a link, which it did perfectly. Unfortunately it also seems to have killed the link to “Ontario” as well. I assume that it is happening because while “Ontario” is a child of “Community”, it is the parent of “North Bay”. Is there an easy tweak to the script so just the top menu links are disabled, and not the sub menu links?
Any help would be much appreciated!
Thanks so much
Mike
Sorry, just to clarify, the menu structure is:
Community
-Ontario
–North Bay
Mike, did you get a solution to this? I have the same problem…
Thanks
Finally, a simple way to do this! Thanks.
You are most welcome.
You can download this plugin from
http://wordpress.org/extend/plugins/disable-parent-menu-link/
Where do you put this?