tefra/navgoco

Menu > Submenu: Link Associated with Menu Item

Closed this issue · 5 comments

When clicking on a menu item that expands into a submenu, how can I have that menu item be clickable to go to the link associated with it after the submenu has been opened?

facing the same problem, the sub menus are not clickable

@Innovaxis i don't see how this could be useful. Have you ever seen a menu where a menu item is both parent and has a proper link?

@henrydjacob i don't think you mean the same think, please provide more info on your issue.

I tried to implement your excellent accordion menu on an old site but came across the same problem as discussed in this "thread". Having a menu both expand and at the same time trigger another URL is in my opionion very common and useful. I guess the most common example is in a webshop where the user clicks a category in the menu which has sub categories. When clicking the browser loads a page presenting the subcategories with images and maybe even descriptions of the categories and "on sale" products at the same time the menu expands.

I would very much appreciate a solution to this, advice on how to solve it or maybe links to another menu plugin that works like it. Maybe @Innovaxis or @henrydjacob found a solution.

Use onClickAfter callback...

onClickAfter: function(e, submenu){
      e.preventDefault();
      var location = $(this).attr('href');
      window.location = location;
    }

Take a look at the new version.
To expand parent menu items with proper links click the caret/arrow. Otherwise business as usual.

Thank you all for your feedback!