Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

showOnClick option for the second-level sub menus

Home Forums Older releases 0.9.x showOnClick option for the second-level sub menus

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1390

    Hello there, please let me know how can I apply the showOnClick on the second-level sub menus.


    Hi sorry for the delay! I was on a vacation.

    By default the showOnClick: true option makes the menu tree behave like OS desktop menus where a click activates the tree and then the sub menus are activated immediately on hover. So you would need some sort of mod. The simplest one I can think of is to add the following code on your page after the SmartMenus jQuery code:

    	// always emulate touch mode
    	$.SmartMenus.prototype.isTouchMode = function() {
    		return true;

    This would emulate touch mode even when mouse input is available and thus make sure any sub menu is only activated on tap/click.


    In this example you hide all the and show the which is it’s sibling, which would ultimately hide the first level of the li and show the second. HTML

    • first


      • Second layer Menu 1
      • Second layer Menu 1
      • Second layer Menu 1
      • Second layer Menu 1


    display: none;

    .hide a{
    display: none;

    .show a{
    display: none;

    .show a.back{

    .show .second-layer{
    display: block;




    For innovative methodologies in Web Apps visit


    I have an issue at the moment where on menu I click a submenu and it dropsdown correctly, but when I click again it goes to the parent link or refreshes the page if my link is # on the parent dropdown.

    When I add the showOnClick true option, I can click on the link and it drops down..but when I click again on it it does nothing, it does not minimise the dropdown…it does nothing

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.