Hide and Show DIV

[Total: 0    Average: 0/5]

This uses the style property to hide and show a div when it is clicked.

Body Code:

<div style="cursor: hand" onClick="toggle(document.all.HideShow);">

To see what happen, CLICK HERE

<span style="color: blue" id=HideShow>
This will go away (Click again and it'll come back)

function toggle(e)
 if (e.style.display == "none" )
     e.style.display = "";
     e.style.display = "none";

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *