Jump to content


- - - - -

Show/Hide Info


  • You cannot reply to this topic
No replies to this topic

#1 Joe

    Root Administrator

  • EC-Owner
  • PipPipPipPipPipPipPipPip
  • 393 posts

Posted 06 March 2008 - 05:32 AM

There is a script which can be used to hide information which you don't want to be shown until you click on it and then re-hide it when you click on something else.

Quote

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<style>
.show{
display:block;
visibility:visible;
}

.hide{
display:none;
visibility:hidden;
}

</style>
<body>
<script language="javascript1.2">
function swapPages(p){
document.getElementById('
section1').className = "hide";
document.getElementById('
section2').className = "hide";
document.getElementById(p).className = "
show";
}[/color]
</script>
<a href="#" onclick="swapPages('section1');">Show Section 1</a>

<a href="#" onclick="swapPages('
section2');">Show Section 2</a>

<div id="section1" class="hide">
<div>This is the first page.</div>
<div>This contains the content of section1</div>
</div>
<div id="section2" class="hide">
<div>This is the second page.</div>
<div>This contains the content of section2</div>
</div>
</body>
</html>


OK if it is in red you must have it! Yellow means you must have it but you can change the name of it and anything not in color you can change to fit your likings. If they are in purple they are linked to something else so make sure to name them the same. Enjoy!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users