jquery - Wordpress Menu Dropdown -


ok have looked everywhere , can not find anything. know might need jquery or something. have tried asking on @ wordpress.org waste of time have had no replies 2-3 days ask here.

  1. my goal have main menu shows active page on , have drop down other menu items. have figured out.

  2. my next thing have child menu of parent shown when parent or child active. kind of have figured out. child menu displays css when parent active.

  3. the next when parent 2 active and/or child of parent 2 active go normal style if hover on other menu item weather has child menu or not. if has child menu want shown in place instead of parent two.

a example of trying achieve dont use nav menu on other page msn there main nav (news, entrainment, etc.) looking want parent and/or child menu shown if active disappear when hovering on other menu items or without child menu's.

so found solution extent have posted question regarding other issues if think can please visit others here solution

$(document).ready(function() {         $("see #1 below ").hover(function(){             $('see #2 below ').addclass(" see #3 below ");        },         function(){            $(' copy #2 ').removeclass("copy #3 ");          }); }); 
  1. put id or class want script activated here
  2. put id or class want script add class here
  3. put class want script add class or id listed #2

you can add multiple id's or classes inserting comma (see example below) here example:

$(document).ready(function() {         $("#navbar li:hover, #navbar li.sfhover").hover(function(){             $('#navbar .current-menu-parent, #navbar li.current-menu-item').addclass("non-ahover");        },         function(){            $('#navbar li.current-menu-parent, #navbar li.current-menu-item').removeclass("non-ahover");          }); }); 

Comments