开发者

How to display submenu in jQuery?

开发者 https://www.devze.com 2023-02-19 05:14 出处:网络
Actually, my sub-menu is on display : none. I need to display the class sub-menu in jQuery. How can do that ?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号