Do not close opened submenu when clicking another

Post Reply
xxiFear
Posts: 2
Joined: 19 Jan 2018, 10:40

19 Jan 2018, 11:24

Is there a way to not close the currently opened submenu when another submenu is clicked?
I'm using pv:menu and like the sidebar menu so far but that's the only option im missing and I could'nt find any information so far.

Thanks in advance

cagatay.civici
Prime
Posts: 18160
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Feb 2018, 19:18

Try removing line 96 at layout.js;

Code: Select all

$this.deactivateItems(item.siblings(), true);
That line closes other open menus, removing it allow having multiple menus at the same time.

xxiFear
Posts: 2
Joined: 19 Jan 2018, 10:40

07 Feb 2018, 10:57

optimus.prime wrote:
05 Feb 2018, 19:18
Try removing line 96 at layout.js;

Code: Select all

$this.deactivateItems(item.siblings(), true);
That line closes other open menus, removing it allow having multiple menus at the same time.
Thanks for your suggestion optimus.
This does indeed not close other submenus.
However, activated submenu items stay activated if i activate another submenu item.

cagatay.civici
Prime
Posts: 18160
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Feb 2018, 12:16

I did not understand the exact case but with some small script changes to layout.js deactivateItems method, I believe you should be able to customize the behavior according to your requirements.

aragorn
Posts: 3841
Joined: 29 Jun 2013, 12:38

09 Feb 2018, 12:22

Are you refreshing the page or navigating a page after clicking a submenu item?

Regards,

Post Reply

Return to “Paradise - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest