Reputation: 7067
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-menu"><br/><li class="menu-item" id="menu-item-2296">Portrait</li>
</ul>
</li>
Upvotes: 2
Views: 2444
Reputation: 664
$('.menu-item').hover(
function () {
$('.sub-menu').show();
},
function () {
$('.sub-menu').hide();
}
);
Upvotes: 4
Reputation: 176936
(".sub-menu").Show() - to show menu
(".sub-menu").Hide() - to hide menu
Upvotes: 1