Hello,
Due to client needs, they wish to have a button that exists on the same page that triggers the dropdown menu. I got the button to open the menu using the following jQuery:
$('#button').click(function(){
$('#list-item).toggleClass('open');
});
But then it breaks the rest of the submenus existing in that submenu. I was trying to implement the itemActivate method, but I must be doing something wrong as nothing happens on the page. My code is as follows:
Markup:
<ul id="main-menu">
<li id="list-item">
<a href="#">Option</a>
<ul class="drowdown-menu">
<li>
<a href="#">Submenu 1</a>
<ul class="dropdown-menu">
<li>Submenu Item</li>
</ul>
</li>
</ul>
</li>
</ul>
Javascript:
$('#button').on('click', function(){
$('#main-menu').smartmenus('itemActivate', $('#list-item > a'));
});
Is this the right method to use? Am I implementing it correctly?
Thanks in advance for your help.