Tom_K
10-23-2007, 08:49 AM
1) Script Title: Switch Content Script II
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm
3) Describe problem: The problem occurs when I use this script within a table. When a certain row is collapsed, it is still visible. A few pixels are still visible and I cannot find a way to make it completely invisible when it is collapsed. I managed to find a solution for IE with tbody tags but then Firefox messes everything up.
Please help.
This is the code I'm trying to fix.
<table width="748" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr align="center" bgcolor="#FFFFFF">
<td><span id="first-title"></span> data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr align="center" bgcolor="#FFFFCC">
<td colspan="7">
<div id="first" class="expand">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>additional data</td>
<td>additional data</td>
<td>additional data</td>
</tr>
</table>
</div>
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</table>
<script type="text/javascript">
var faqtable=new switchicon("expand", "div") //Limit scanning of switch contents to just "div" elements
faqtable.setHeader('<img src="../images/minus.gif" valign="middle">', '<img src="../images/plus.gif" valign="middle">') //Set header HTML
faqtable.collapsePrevious(false) //Allow more than 1 content to be open simultanously
faqtable.setPersist(false) //Enable persistence to remember last switch content states for 7 days
faqtable.init()
</script>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm
3) Describe problem: The problem occurs when I use this script within a table. When a certain row is collapsed, it is still visible. A few pixels are still visible and I cannot find a way to make it completely invisible when it is collapsed. I managed to find a solution for IE with tbody tags but then Firefox messes everything up.
Please help.
This is the code I'm trying to fix.
<table width="748" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr align="center" bgcolor="#FFFFFF">
<td><span id="first-title"></span> data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr align="center" bgcolor="#FFFFCC">
<td colspan="7">
<div id="first" class="expand">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>additional data</td>
<td>additional data</td>
<td>additional data</td>
</tr>
</table>
</div>
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</table>
<script type="text/javascript">
var faqtable=new switchicon("expand", "div") //Limit scanning of switch contents to just "div" elements
faqtable.setHeader('<img src="../images/minus.gif" valign="middle">', '<img src="../images/plus.gif" valign="middle">') //Set header HTML
faqtable.collapsePrevious(false) //Allow more than 1 content to be open simultanously
faqtable.setPersist(false) //Enable persistence to remember last switch content states for 7 days
faqtable.init()
</script>