I'm trying to open a submenu from the parent link using the mmenu jquery plugin, and almost got it, but once open the submenu, the function also close the menu (the main menu opened from the left).
I got this:
<nav data-role="navbar" data-iconpos="left" id="leftMenu">
<ul>
<li><a id="a_home" href="/" >Home</a></li>
<li><a id="a_what" href="/" >What to do</a></li>
<li>
<a id="a_guides" href="#guidesSubmenu" onclick="$('#leftMenu ul#guidesSubmenu').trigger( 'open.mm' );" >Guides</a>
<ul id="guidesSubmenu">
<li><a href="/">Beer Guide 2013</a></li>
<li><a href="/">Bar Guide 2013</a></li>
<li><a href="/">Cheap Eats 2013</a></li>
</ul>
</li>
<li>
<a id="a_sections" href="#" >Sections</a>
</li>
</ul>
</nav>
So, when I click on the Guides link, opens the submenu, but also close the main menu, animating to the right. Anybody knows how is the right way to open a submenu?
This is the plugin page: http://mmenu.frebsite.nl/ Is not a simple jquery javascript.
Thanks.
Just change the selector with your own li tags class name.I think you can also toggle method.