How to display submenu in jQuery?
Actually, my sub-menu
is on display : none
.
I need to display the class sub-menu in jQuery.
How can do that ?
<li class="menu-item" id="menu-item-2292">
<a href="/photos">Photos</a><br/>
<ul class="sub-men开发者_StackOverflow中文版u"><br/><li class="menu-item" id="menu-item-2296">Portrait</li>
</ul>
</li>
$('.menu-item').hover(
function () {
$('.sub-menu').show();
},
function () {
$('.sub-menu').hide();
}
);
(".sub-menu").Show() - to show menu
(".sub-menu").Hide() - to hide menu
精彩评论