Show and Hide Content Simple
Okay this is a tutorial on how to hide or show content on your website. Making your website much more interactive.
If any one wants to request an demo example of the script then please post a comment.
Okay heres the script...
Code
<script language="javascript" type="text/javascript">
function toggle(item) {
obj = document.getElementById(item);
visible = (obj.style.display != "none");
if(visible){
obj.style.display = "none";
} else {
obj.style.display = "block";
}
}
</script>
[<a onclick="toggle('blob');">show/hide</a>]<br />
<div id="blob">
Huge amounts of text and images and php code here if you like. Tables, marquees all can be hidden when someone clicks show/hide.
Also you may need to adjust the show/hide link so it looks more like a link.
Thanks.
</div>
Okay so thats simply all of it.
Try it out now, its pretty cool.
Thanks,
There shouldn't be any problems with it.