WordPress.org

Ready to get started?Download WordPress

Forums

Using JQuery Collapse with wp_nav_menu (3 posts)

  1. benaps
    Member
    Posted 3 years ago #

    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?

  2. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

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

  3. hakre
    Member
    Posted 2 years ago #

    Actually that's true, however the question remains how to do it? Even with CSS only ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.