I am a javascript beginner, but I have implemented this code elsewhere and it worked. Did I overlook something obvious?
https://jsfiddle.net/x3oj787q/1/
html:
<a href="javascript:toggle_visibility('div');">help</a>
<div id="div"style="display: none;">
help
</div>
js:
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}