PDA

View Full Version : show/hide support... mutiple nested divs...


mnkeybsness
Feb 5, 2004, 07:08 PM
okay so in light of wanting to do this for a long time and finally finding the resources, i wanted to do a little show/hide with the comment section of each individual archive on my site (example page with comment section (http://www.paularms.com/archives/000058.html))...

the only problem is, when i try to implement the javascript show/hide function, it will only show/hide the main content included in the element that i am showing/hiding and will NEVER show anything that is in a <div> element inside of the main show/hide element...

so basically what i'm saying is the stripped down version of the show/hide area on the page looks like this...

<a href="javascript:handleParent(1)">Comments...</a>
<div id="showhide1">
<div class="aboutHeader">Comments</div>

<div class="blogbody">
this is a comment
</div>

</div>

ps, i'm using the javascript code submitted by fugeelama in this thread (http://forums.macrumors.com/showthread.php?s=&threadid=57676), except i changed it a little so the function changes the showhide div