Having a problem that a collapsible menu in a fixed sidebar is not staying open when the links are clicked (or when the page simply refreshes).
I used the suggestions based on this question about using a cookie to store the div's state but it's not working (toggle state is still not persisting).
I added a link to the plugin (AFTER my jQuery src link):
<script src="js/jquery.cookie.js" type="text/javascript"></script>
And the toggle state still doesn't stay, even live on a .com website.
if ($.cookie('div') == 'open'){
$('#the_more_div').slideDown('slow');
} else {
$('#the_more_div').slideUp('slow');
}
$('#hamburger').click(function(){
$('#the_more_div').slideToggle('slow', function(){
if ($(this).is(':hidden')) {
$.cookie('div', 'closed');
} else {
$.cookie('div', 'open');
}
});
});
The toggle works just fine but why wouldn't the_more_div stay open when different links are clicked inside it (or on page refresh).
Thank you in advance!