Toggle menu: click open, click close

Hello.

Our hugo parent menus open on click to child menus but would like to be able to click again and close the parent menu.

Initial State

  1. Parent 1
  2. Parent 2
  3. Parent 3

Click on Parent 2 yields

  1. Parent 1
  2. Parent 2
    Child 1
    Child 2
    Child 3
  3. Parent 3

Would like to click again on Parent 2 to close and return to initial state.

  1. Parent 1
  2. Parent 2
  3. Parent 3

Haven’t been able to find any documentation on this. Is there a configuration to allow this kind of open/close menu toggling?

Thanks.

Hi @npaszty. This is JS/CSS territory, not Hugo

1 Like

thanks @zwbetz. will research references to implement JS/CSS in the menus. cheers, Nick.

1 Like

You may want to study numerous examples available here: http://www.cssplay.co.uk/menus/
Stu Nicholls has been exploring cutting edge CSS for many years and is a recognised authority.

2 Likes