 <p>Wrap the "commented" code in a div... and toggle visibility (as posted below) :</p> <pre><code>function toggleVisibility(var v) { var vis="hidden"; if (v) vis="visible"; document.getElementById('yourDiv').style.visibility = vis; } </code></pre>