Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show/Hide CSS
<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
You can’t perform that action at this time.