I am trying to get a 3rd level menu to automatically expand when its first level parent is expanded. So in the example I have, when you hover over the first item I want the Item 1 submenu to show (like normal) and then also the first submenu under that. Item 2 should also be showing. http://jsfiddle.net/n2Sxc/1/
I have tried to use this code, which is in the jsfiddle.
$("#main-nav li").mouseover(function () {
$("#main-nav li ul li.first ul").show();
});
I have also looked at the api documentation, but it isn't really clear to me how to use expand or focus. I'm not sure if that's even what I want to use.
Focus: http://api.jqueryui.com/menu/#event-focus
Expand: http://api.jqueryui.com/menu/#method-expand
I have also tried this when initiating the menu
$('#main-nav').menu({
focus: function( focus, ui ) {
$("#main-nav li").hover(function (){
$("#main-nav li ul li.first ul").show();
});
}
});