Title: Using JQuery Collapse with wp_nav_menu
Last modified: August 20, 2016

---

# Using JQuery Collapse with wp_nav_menu

 *  [benaps](https://wordpress.org/support/users/benaps/)
 * (@benaps)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/using-jquery-collapse-with-wp_nav_menu/)
 * 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](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/using-jquery-collapse-with-wp_nav_menu/#post-2174666)
 * Why would you bring out jQuery when you can control it fully using only CSS?
 *  [hakre](https://wordpress.org/support/users/hakre/)
 * (@hakre)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-collapse-with-wp_nav_menu/#post-2175055)
 * 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.

 * 2 replies
 * 3 participants
 * Last reply from: [hakre](https://wordpress.org/support/users/hakre/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-collapse-with-wp_nav_menu/#post-2175055)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
