MyBB Community Forums

Full Version: Collapsible Tables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm creating a couple of custom pages with a couple of tables and wanted to make them collapsible like on the board index, anyone able to give me a hand with it cause I'm having a hard time with it.
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;" width="100%">
<thead>
<tr>
<td class="thead">
<div style="float:left">
<!-- 
	TABLE HEADER
-->
</div>
<div style="float:right;" class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['COL']}.gif" id="COL_img" class="expander" alt="[-]" /></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['COL_e']}" id="COL_e">
<tr>
<td class="trow1">
<!--
	CONTENT
-->
</td>
</tr>
</tbody>
</table>

If you add more collapsible tables at the same page; don't forget to change 'COL' to something else !
table1 = COL1 , table2 = COL2 and so on ... cause that's a kind of identifier !