Title: show/hide second level dynamic navigation &#8211; how?
Last modified: August 19, 2016

---

# show/hide second level dynamic navigation – how?

 *  [Json Koning](https://wordpress.org/support/users/minion08/)
 * (@minion08)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/showhide-second-level-dynamic-navigation-how/)
 * Hi there,
    I have a static html file containing a vertical nav;
 *     ```
       <ul>
        <li>First Level
          <ul>
           <li>Second Level</li>
          </ul>
        </li>
       </ul>
       ```
   
 * That kinda thing, live demo here (albeit un-styled);
 * [http://web.mydns.net.nz/one-to-one.co.nz/wp-content/themes/121/navigation.html](http://web.mydns.net.nz/one-to-one.co.nz/wp-content/themes/121/navigation.html)
 * Anyway, I have used this code (below) to dynamically generate the nav now – rather
   than hard code it;
 *     ```
       <div id="sidebar1">
         <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?>
         <div id="submenu">
           <ul>
             <?php wp_list_pages("title_li=&child_of=$parent" ); ?>
           </ul>
         </div>
         <?php endif; ?>
       </div>
       ```
   
 * Live demo here (styled): [http://web.mydns.net.nz/one-to-one.co.nz/](http://web.mydns.net.nz/one-to-one.co.nz/)
 * But now, how do I enable the show/hide rollover effect for the second level navigation(
   seeing as it’s dynamically generated)?
 * Thanks in advance…
    No idea

The topic ‘show/hide second level dynamic navigation – how?’ is closed to new replies.

## Tags

 * [hide](https://wordpress.org/support/topic-tag/hide/)
 * [hover](https://wordpress.org/support/topic-tag/hover/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)
 * [second](https://wordpress.org/support/topic-tag/second/)
 * [show](https://wordpress.org/support/topic-tag/show/)

 * 0 replies
 * 1 participant
 * Last reply from: [Json Koning](https://wordpress.org/support/users/minion08/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/showhide-second-level-dynamic-navigation-how/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
