Created
November 27, 2012 23:53
-
-
Save BDFife/4158029 to your computer and use it in GitHub Desktop.
Show/Hide CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script language=javascript type='text/javascript'> | |
function toggle_visiblity(id) { | |
var e = document.getElementById(id); | |
if (e.style.display == 'block') | |
e.style.display = 'none'; | |
else | |
e.style.display = 'block'; | |
} | |
</script> | |
</head> | |
<body> | |
<h1> Show/Hide Example: </h1> | |
<p><a href="javascript:toggle_visibility('boo')"> Click here. </a></p> | |
<div id="boo" style="display:none;"> | |
<p> Amazing hiding and re-appearing text! </p> | |
</div> | |
</body> | |
</html> | |
http://css-tricks.com/snippets/javascript/showhide-element/ | |
http://www.willmaster.com/blog/css/show-hide-div-layer.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment