悬停父 UL 时如何选择菜单项 (LI)?
例子:
<ul class="topmenu">
<li>item 1</li>
<li>item 2</li>
<li class="thisone">item 3
<ul>
<li>subMenu1</li>
<li>subMenu2
<ul>
<li>This should appear when Hover First Level Item3, would be like someone would be hovering subMenu2, but when actually hovered Item3</li>
</ul>
</li>
<li>subMenu3</li>
</ul>
</li>
<li>item 4</li>
</ul>
jQuery(像这样)
$document.ready(function(){
$('.topmenu .thisone').hover(function(){
$(this).closest('li:has('ul')).select();
});
});
有人可以帮忙吗?谢谢!