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

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -