Template:Hide

From 2009.igem.org

(Difference between revisions)
 
(3 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<includeonly><span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">[show]</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">[hide]</span>
+
<head>
-
<div class="_toggle_inithide _toggle toggle-hidden">
+
<script type="text/javascript">
-
{{{1}}}</div></includeonly><noinclude>
+
<!--
 +
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
 +
{
 +
    if(document.layers)   //NN4+
 +
    {
 +
      document.layers[szDivID].visibility = iState ? "show" : "hide";
 +
    }
 +
    else if(document.getElementById)   //gecko(NN6) + IE 5+
 +
    {
 +
        var obj = document.getElementById(szDivID);
 +
        obj.style.visibility = iState ? "visible" : "hidden";
 +
    }
 +
    else if(document.all) // IE 4
 +
    {
 +
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
 +
    }
 +
}
 +
// -->
 +
</script>
 +
 
 +
<body>
 +
    <!-- Put it anywhere in the <body> and </body> part of the HTML -->
 +
 
 +
<div ID="demodiv" class="demo">
 +
  Put text, tables or any other HTML contents here, as you would put in
 +
  any other HTML page.
 +
  .....
 +
  ..... and more.
 +
</div>
 +
                          <!-- To Show The DIV -->
 +
 
 +
<input type="button" onClick="toggleBox('demodiv',1);" value="Show Div">
 +
 
 +
                          <!-- To Hide The DIV -->
 +
 
 +
<input type="button" onClick="toggleBox('demodiv',0);" value="Hide Div">
 +
</body>
 +
 
 +
</head>
</html>
</html>

Latest revision as of 08:53, 8 September 2009

Put text, tables or any other HTML contents here, as you would put in any other HTML page. ..... ..... and more.