2

Assume I have this fiddle http://jsfiddle.net/pnmpn25/VPXjs/

$( "#menu" ).menu();

It's the demo implementation from the jquery ui site. When I click on Salzburg->Delphi the submenu for Delphi stays open, this is what I want.

When I click on Salzburg->Delphi->Delphi or Salzburg->Perch, the submenu closes. I dont want this.

How can I get the jquery ui menu to not close a submenu if the submenu doesnt have any child menus? Any help is appreciated.

Sumit
  • 1,661
  • 1
  • 13
  • 18

1 Answers1

2

Even if i don't really understand why you want to do such action (it's quite a common thing to close the menu when item is selected), you can call focus() method when an item is selected to prevent menu from closing like in this jsFiddle

rd3n
  • 4,440
  • 1
  • 33
  • 45
  • Cool, thank you, I want to keep the menu open because I have checkboxes within the menu, allowing multi selection, so I needed to have the sub menus stay open unless clicked in the document. Thanks again. – Sumit Oct 08 '13 at 13:52