The extra gap when the table is collapsed is due to the <td> surrounding the content I believe. Using your code snippet posted above:
Code:
<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>
To get rid of it, one way is to not collapse the DIV, but the parent <td> instead. Try the below changes:
Inside switchcontent.js, edit the following code chunk:
Code:
switchcontent.prototype.toggledisplay=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
if (innercontent.parentNode.style.display!="none")
The code in red is the modified line from the default. Then, inside switchicon.js:
Code:
switchicon.prototype.contractcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
innercontent.parentNode.style.display="none"
and:
Code:
switchicon.prototype.expandcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", ""))
innercontent.parentNode.style.display=""
Bookmarks