Keeping Accordion Menu open when menu items area selected?
Hey ladies and gents,
I wonder if anyone can help me, massive help if you can :)
I have created a jquery accordion menu for a brilliant CMS called 'Concrete5' and all works lovely BUT I now would like the menu to stay open if a menu item is selected within the drop list.
I have manged to create the following.....
- var pathname = window.location.pathname;
- var selecteda = $(".nav-selected a").attr("href");
- // alert (selecteda)
- // alert (pathname)
- if ( selecteda == pathname ){
- $('.nav-path-selected').parent().children().show();
- } else {
- $('#am_menu .nav-selected').hide();
- }
- }
..but it doesn't seem to work :'(
I'm not a JQuery GOD like most of you on here but I am trying my hardest :D
The accordion menu I am trying to get this to happen on is Accordion Menu.
Any pointers or help is massively appreciated.
Thanks in advance, Chris
- Chris Watterston
- - Freelance Graphic & Web Design
- - - www.funkthemedia.com