D
dweeti
Hi,
I am trying to display the child element in the DOM, while hiding the
parent using JS and CSS, however I cannot find a way to do this.
So for example:
<body>
<div id="Parent">
<div id="child_1"></div>
<p id="child_2"></p>
</div>
</body>
I am trying to hide "Parent", and "child_1" and show "child_2". I
cannot change the possition in the actual mark up so i need script to
do this.
and so far hiding Parent using:
$("Parent").style.display="none";
Hides all the child elements.
Do anyone know how I can do this? or an alternative method to achive
the same result?
Thanks in advance.
I am trying to display the child element in the DOM, while hiding the
parent using JS and CSS, however I cannot find a way to do this.
So for example:
<body>
<div id="Parent">
<div id="child_1"></div>
<p id="child_2"></p>
</div>
</body>
I am trying to hide "Parent", and "child_1" and show "child_2". I
cannot change the possition in the actual mark up so i need script to
do this.
and so far hiding Parent using:
$("Parent").style.display="none";
Hides all the child elements.
Do anyone know how I can do this? or an alternative method to achive
the same result?
Thanks in advance.