Support » Themes and Templates » Using JQuery Collapse with wp_nav_menu

  • benaps

    (@benaps)


    I am creating a theme and connecting it with the native WP menu manager, then I plan to use JQuery-Collapse for when there are submenus.

    This is the menu code generated by wp_nav_menu()

    <div id="collapse_menu">
    <div class="menu-sidebar-container">
      <ul id="menu-sidebar" class="menu">
        <li id="menu-item-61" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-61"><a href="http://localhost/wordpress/?page_id=36">Home</a></li>
        <li id="menu-item-62" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-62"><a href="http://localhost/wordpress/?page_id=44">Fruits</a>
            <ul class="sub-menu">
    	   <li id="menu-item-64" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-64"><a href="http://localhost/wordpress/?page_id=46">History</a></li>
    	   <li id="menu-item-63" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-63"><a href="http://localhost/wordpress/?page_id=48">Aims</a></li>
            </ul>
        </li>
      </ul>
    </div>

    How can I use JQuery-collapse with this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Chip Bennett

    (@chipbennett)

    Theme Review Admin

    Why would you bring out jQuery when you can control it fully using only CSS?

    Actually that’s true, however the question remains how to do it? Even with CSS only 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using JQuery Collapse with wp_nav_menu’ is closed to new replies.