Title: Custom theme dropdown menu not working
Last modified: August 21, 2016

---

# Custom theme dropdown menu not working

 *  Resolved [Lolliedoll](https://wordpress.org/support/users/lolliedoll/)
 * (@lolliedoll)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/)
 * Hi everyone!
 * I’ve built a custom theme for [my blog](http://www.lolliedoll.com) and I can’t
   get my dropdown menu working. I followed a tutorial using javascript, but I don’t
   know javascript very well. I think there is something wrong with this code, but
   I don’t know how to fix it:
 *     ```
       <script type="text/javascript">
       (function() {
           $("#navigation ul.menu ul").css({ display: 'none' });
           $("#navigation ul.menu li").hover(function() {
               $(this).find('ul.sub-menu')
                   .stop(true, true).delay(10).animate({ "height": "show", "opacity": "show" }, 200 );
           }, function(){
               $(this).find('ul.sub-menu')
                   .stop(true, true).delay(10).animate({ "height": "hide", "opacity": "hide" }, 200 );
           });
       });
       </script>
       ```
   
 * Any help would be greatly appreciated! I want to be able to make my menus in 
   the wordpress menus function and have the second level navigation actually work!
 * xxMillie

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/#post-3657406)
 * Which tutorial are you following?
    Also see [http://codex.wordpress.org/Using_Javascript](http://codex.wordpress.org/Using_Javascript)
 *  Thread Starter [Lolliedoll](https://wordpress.org/support/users/lolliedoll/)
 * (@lolliedoll)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/#post-3657407)
 * I copied/pasted it all in ages ago and was a loser and didn’t bookmark where 
   I got it from, so I don’t remember. The javascript I posted above is in the header.
   php file before </head> The script itself didn’t come in a file so linking it
   in isn’t possible and at this stage javascript is still completely over my head…
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/#post-3657408)
 * A reason why it’s not working is that it’s set to run ASAP, before any page elements
   are loaded.
 * Other reasons could be that it’s not using [noconflict wrappers](http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers)
   or being [ enqueued](http://codex.wordpress.org/Function_Reference/wp_enqueue_script).
 *  Thread Starter [Lolliedoll](https://wordpress.org/support/users/lolliedoll/)
 * (@lolliedoll)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/#post-3657412)
 * Thank you so much! It wasn’t using noconflict wrappers!! Now to code it to display
   better! I’ve been stuck on this for ages, thank you so much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom theme dropdown menu not working’ is closed to new replies.

## Tags

 * [custom theme](https://wordpress.org/support/topic-tag/custom-theme/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [submenus](https://wordpress.org/support/topic-tag/submenus/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Lolliedoll](https://wordpress.org/support/users/lolliedoll/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/custom-theme-dropdown-menu-not-working/#post-3657412)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
