I'm having trouble making it so that when a logged in user hides a certain part of the menu for it to stay that way during their session.
$(document).ready(function () {
$('h1.tree-toggler').click(function () {
$(this).parent().children('ul.tree').toggle(300);
});
});
With this HTML:
<div>
<h1 class="tree-toggler">Heading</h1>
<ul class="tree">
<a href="#"><li>Link 1</li></a>
<a href="#"><li>Link 2</li></a>
<a href="#"><li>Link 3</li></a>
<a href="#"><li>Link 4</li></a>
<a href="#"><li>Link 5</li></a>
</ul>
</div>
The toggle works perfectly, but it doesn't stay like it when you change page.
How can I make it stay how it is toggled on the next page?