Reply To: Separate button triggers dropdown menu

Home Forums Older releases 0.9.x Separate button triggers dropdown menu Reply To: Separate button triggers dropdown menu

#2437
admin
Keymaster

Hi,

Yes, this is the method but if the option hideOnClick is set to true (and it is by default), the sub menu will be reset immediately after it is activated since the button click bubbles to the document and there the hideOnClick hander is executed. You can avoid this, for example, by calling the method asynchronously with a short timeout like this:

$('#button').on('click', function() {
     setTimeout(function() {
          $('#main-menu').smartmenus('itemActivate', $('#list-item > a'));
     }, 1);
});

Let me know if you still have any troubles.

Register

You will be emailed a link to set your password.

Login

Lost password?