Hello
I am using that code
it works fine but if a box is closed and the page is reloaded then the box open again, how is it possible to keep the box status : open if open , close if close ?Code:function shDiv(popup) { var box = document.getElementById(popup) var a = document.getElementById(popup + '_a') var t = document.getElementById(popup + '_t') a.innerHTML =(a.innerHTML=='[ - ]')?'[ + ]':'[ - ]'; t.className =(t.className=='Tclose')?'Topen':'Tclose'; box.style.display = (box.style.display=='none')?'block':'none'; } <h4> <a href="#" onclick="shDiv('box1');" id="box1_a">[ + ]</a> <span id="box1_t" class="Topen">Box 1</span></h4> <div class="shBox" id="box1" style="display:none;">Content 1</div>
thank you



Reply With Quote

Bookmarks