In case you are interested in a jQuery soluton:
This is the HTML
<a id="button" href="#">Show/Hide</a>
<div id="item">Item</div>
This is the jQuery script
$( "#button" ).click(function() {
$( "#item" ).toggle();
});
You can see it working here:
If you don't know how to use jQuery, you have to use this line to load the library:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
And then use this line to start:
<script>
$(function() {
// code to fire once the library finishes downloading.
});
</script>
So for this case the final code would be this:
<script>
$(function() {
$( "#button" ).click(function() {
$( "#item" ).toggle();
});
});
</script>
Let me know if you need anything else
You can read more about jQuery here: http://jquery.com/