Hi,

I have this code for collapsing div below. What I want to achieve is that when I go back to the page, it would remember whether the div was collapsed(style.display = none) or expanded(style.display = block). Here is the collapse/expand script:

Code:
<script type="text/javascript">
function toggleDiv(div){
	  if(document.getElementById(div).style.display == 'none'){
		document.getElementById(div).style.display = 'block';
	  }else{
		document.getElementById(div).style.display = 'none';
	}
}
</script>
This is the html code calling the toggle function:

Code:
<h3 class="hndle" onmousedown="toggleDiv('div0')">
<span>Footer Options</span>
</h3>
<div id="div0">
EXPANDED
</div>
I was hoping to use JQuery cookies, but I'm still a beginner with this. Please help, thanks!