Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Show/Hide CSS
<script language=javascript type='text/javascript'>
function toggle_visiblity(id) {
var e = document.getElementById(id);
if ( == 'block') = 'none';
else = 'block';
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment