Hi,
Help with this code pls...
I ve a javascript which expands a div onclick.
I have a page with Content list on the left, When clicked on the content name, its description expands on the right.
I am using the above javascript to do the same
But the problem is,
When u click a content its description expands, then when u click the next content even its description expands. But t previous one doesn't collapse.
Pls help me how to just show one div content at a time
Many Thanks
Bh
Help with this code pls...
I ve a javascript which expands a div onclick.
Code:
<script language="javascript" type="text/javascript">
<!--
function show_hide(obj) {
var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}
else {
el.style.display = '';
}
}
// -->
</script>
I am using the above javascript to do the same
But the problem is,
When u click a content its description expands, then when u click the next content even its description expands. But t previous one doesn't collapse.
Pls help me how to just show one div content at a time
Many Thanks
Bh
Comment