Add jquery effects on default wp menu
-
Hi all,
The main menu in my website is displayed by “wp_nav_menu” function. It’s a dropdown menu controlled by css. I’d like to add some jquery effects everything I’ve tried so far is not working.This is the javascript code I’m using:
<script type="text/javascript"> $(document).ready(function() { $("ul#menu-main ul").css({ display: 'none' }); $("ul#menu-main li").hover(function() { $(this).find('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "show", "opacity": "show" }, 200 ); }, function(){ $(this).find('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "hide", "opacity": "hide" }, 200 ); }); }); </script>
The code seems correct to me but it’s not working. I’m using jquery v1.6.1 in my pages. Am I missing something?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add jquery effects on default wp menu’ is closed to new replies.