I've been at this for a while and I can't seem to crack it.. I have some javascript trying to hide sibling divs, besides the one that is passed through the function. Here's the html:
<div id = "chat_content">
<div id = "chat_content_1">This is div one</div>
<div id = "chat_content_2">This is div two</div>
<div id = "chat_content_3">This is div three</div>
</div>
And here's the javascript:
function showGroup(id)
{
// show the the div that was clicked
var e = document.getElementById(id);
e.style.display = 'block';
// hide the others divs under the same parent
var children = e.parentNode.childNodes;
for (var i = 0; i < children.length; i++)
{
if (children[i] != e)
{
children[i].style.display = 'none';
}
};
}
thanks! and happy holidays :)