I have this JS code for my menu:
$(document).ready(function () {
$('#nav > li > a').click(function(e){
if ($(this).attr('class') != 'active'){
$('#nav li ul').slideUp();
$(this).next().slideToggle();
$('#nav li a').removeClass('active');
$(this).addClass('active');
}
});
});
what is the best way to make the sub menus stay open when the page is changed - maybe using cookies or sessions?
I have created a jsfiddle here so you can see the full html and css etc: http://jsfiddle.net/bMkEj/