Menu
I’m creating a script that saves my collapsed/expanded panel’s state. This is my code for the collapsible panels.
[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>
Here is the html code that calls the script:
[CODE]<h3 class=”hndle” onmousedown=”toggleDiv(‘div0’)”>
<span>Toggle</span>
</h3>
<div id=”div0″”>
<p>Expanded</p>
</div>
I’d like to use JQuery cookies for this, but I’m a total beginner with it. Please help!