/ Published in: PHP

Heres how to use it:
link
sample content under div
link
sample content under div
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> var status=1; function changeObjectVisibility(objectId, newVisibility) { // first get a reference to the cross-browser style object // and make sure the object exists var styleObject = getStyleObject(objectId); if(styleObject) { styleObject.visibility = newVisibility; return true; } else { // we couldn't find the object, so we can't change its visibility return false; } } function getStyleObject(objectId) { // checkW3C DOM, then MSIE 4, then NN 4. // if(document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) { return document.all(objectId).style; } else if (document.layers && document.layers[objectId]) { return document.layers[objectId]; } else { return false; } } function toggle() { if (status==1) { status=0; changeObjectVisibility('container','visible'); } else { status = 1; changeObjectVisibility('container','hidden'); } } </script>
Comments
