Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using the WordPress (Appearance > Menus) feature to create a custom navigation menu. I created a menu item that has a dropdown and would like to activate the dropdown menu with a click rather than mouse hover. How would I go about doing this? I'm familiar wit jQuery, I just don't know how to remove the current hover state.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The hover is part of the theme you are using. You need to find whats causing the dropdown on hover and remove it. It'll either be javascript controlled or css. You can test if its javascript by disabling javascript, although is may have a css fallback. If its CSS use firebug to find the selectors for the nav menu. In your css file there will be something that looks like

ul li:hover ul{} 

or if its a twentyten based them it'll be

#access ul li:hover > ul{}

You can comment or delete that line. Then use jquery add the css that :hover psuedo selecter was adding.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.