i have this show/hide menu.
It is possibly this menu make with memory?( I open sub menu, refresh page and this sub menu stil open. )
<script type="text/javascript">
function change(id){
ID = document.getElementById(id);
if(ID.style.display == "")
ID.style.display = "none";
else
ID.style.display = "";
}
</script>
<div onclick="change(5)" style="cursor: hand">
<a href = "#">+</a>News
</div>
<div style="display: none" id="5">
News1<br/>
News2<br/>
</div>
Short answer: Cookies.
Long answer: I suggest you dont try it unless it is really important. Cookies are quite complicated. However, assuming you only want to store one value, it could be simplified.
Heres two nice functions for setting and reading cookies from Quirksmode, if you must:
Then you could do something like: