Skinnybobb
11-03-2006, 02:46 PM
1) Script Title: Switch Content Script II
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm
3) Describe problem: I am using the above script with tables. Is it possible to have more than 1 cell and 1 row underneath its header?
My useless HTML code so far:
<table border="0" width="99%" cellspacing="0" cellpadding="0">
<tr>
<td class="headers" colspan="2"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc3')" />What is DHTML? (table example)</td>
</tr>
<tr>
<td id="sc3" class="switchcontent">This is the first cell on the first row under the DHTML header.</td>
<td id="sc3" class="switchcontent">This is cell 2</td>
</tr>
<tr>
<td id="sc3" class="switchcontent">This is the first cell on the second row under the DHTML header.</td>
<td id="sc3" class="switchcontent">This is cell 2</td>
</tr>
</table>
With this change to the css:
.switchcontent{
width: 49%;
border: 1px solid black;
border-top-width: 0;
}
Thanks for any help.
SB
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm
3) Describe problem: I am using the above script with tables. Is it possible to have more than 1 cell and 1 row underneath its header?
My useless HTML code so far:
<table border="0" width="99%" cellspacing="0" cellpadding="0">
<tr>
<td class="headers" colspan="2"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc3')" />What is DHTML? (table example)</td>
</tr>
<tr>
<td id="sc3" class="switchcontent">This is the first cell on the first row under the DHTML header.</td>
<td id="sc3" class="switchcontent">This is cell 2</td>
</tr>
<tr>
<td id="sc3" class="switchcontent">This is the first cell on the second row under the DHTML header.</td>
<td id="sc3" class="switchcontent">This is cell 2</td>
</tr>
</table>
With this change to the css:
.switchcontent{
width: 49%;
border: 1px solid black;
border-top-width: 0;
}
Thanks for any help.
SB