I am working on a site with a fairly large accordion style navigation (it does not use the accordion UI).
There are four sub-menu sections that toggle open when clicked. I have the active link highlighted. The one remaining step is to keep the current active sub-menu open when on a page within the sub-menu. I can keep it open when I am working with static pages, but on this site the navigation is an includes file and therefore I need some help working out a dynamic way to keep those sections open.
Here is the code I am using:
<script type="text/javascript">
$(function(){
$('ul#menu3 ul').hide();
$('ul#menu3 > li > a.drop').click(function(){
$(this).parent().children('ul').toggle("slow");
return false;
});
});
</script>
Basically what I need is some way to apply a class to the active group so that it will show. Any help would be greatly appreciated.
Thanks.