javascript - Wordpress : hide Submenus, but show active submenu (3 tier) -
i've searched , down internet , cannot find answer fits specific needs this. i'd appreciate help.
i've set menu in wordpress, , have set jquery code hide .sub-menu top level menu items show. on click, second tier opens, , clicking on 1 of open third tier. third tier url links, others #.
that works lovely. problem is, when user clicks on third-tier link, , taken relevant page, want tier stay open on new page.
i've managed assign .active class li within ul open page, can't seem target in jquery force show sub-menu ul/li has .active class...
any ideas?
my jquery:
$('.sub-menu').hide(); //hide children default $('li a').click(function(){ $(this).siblings('.sub-menu').slidetoggle('slow'); }
how target correct navigation tier keep 1 open when viewing page?
Comments
Post a Comment