I have a bunch of items setup with \[code\]<div id="first" class="source">\[/code\]I'm in Google Chrome, and when page loads it hides those items when I click the OnClick button it will un hide them, but I'm not able to click it again and make it hide.HTML\[code\]<body onload="setup();"><a href="http://stackoverflow.com/questions/15823102/#first" onClick="shoh('first');" >\[/code\]JS:\[code\]function setup() { foo = document.getElementById('first'); foo = document.getElementsByClassName('source'); for (c=0; c<foo.length; c++) { foo[c].style.display='none' }}function shoh(id) { if (document.getElementById(id).style.display = 'none'){ var divs = document.getElementById(id); for(var i=0; i<divs.length; i++) { divs.style.display='block' } } else { cow = document.getElementById(id); for(a=0; a<cow.length; a++) { cow[a].style.display='none' } }}\[/code\]