when using the code below, the toolbar is visible on every page regardess whether it was previously closed on any other page. When on any particular page the user can open it or close it.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#toolbar-trigger").click(function(){
jQuery(this).next("#toolbar-spacer").slideToggle("slow");
});
});
</script>
<div id="toolbar-trigger" class="arrow"></div>
<div id="toolbar-spacer" class="toggle_container">
<div class="spacer">
CONTENT
</div>
</div>
I would like the toolbar to stay hidden on all pages if the user chooses to hide the toolbar. Only the trigger should remain visible.
Thank you!
You can store the state of the toolbar in a cookie. Since jQuery doesn’t natively support cookies you’ ll need a plugin for that. Read this tutorial it might help you.