Nobrogram.
Le pongo un ejemplo muy sencillo y basico y usted me dira si le sirve o no.
Código HTML:
Ver original<!DOCTYPE html>
function demonone(quien)
{
document.getElementById(quien).style.display="none";
if(quien=='p1')
{
document.getElementById('bhp2').disabled = true;
document.getElementById('bsp2').disabled = true;
}
}
function demoblock(quien)
{
document.getElementById(quien).style.display="block";
if(quien=='p1')
{
document.getElementById('bhp2').disabled = false;
document.getElementById('bsp2').disabled = false;
}
}
#p1
{
background-color: blue;
color: #FFFFFF;
padding: 10px;
}
#p2
{
background-color: #FFFFFF;
width: 50%;
color: #000000;
}
This is some father text.
<div id="p2">This is some son text.
</div> <input id="bhp1" type="button" onclick="demonone('p1')" value="Hide father text with display property" /> <input id="bsp1" type="button" onclick="demoblock('p1')" value="Show father text with display property" /> <input id="bhp2" type="button" onclick="demonone('p2')" value="Hide son text with display property" /> <input id="bsp2" type="button" onclick="demoblock('p2')" value="Show son text with display property" />