hello
i have a table like following code , i want at first the child tables not seen but when user click on the row the child table for other rows closed and child table under this row open
how i could make this with jquery?
<table class="mainTable">
<thead>
<tr class="header">
<th style="width:33%">col1</th>
<th style="width:33%">col2</th>
<th style="width:33%">col3</th>
</tr>
</thead>
<tr>
<td class="even" colspan="3">
<table class="childTable"">
<thead>
<tr>
<th style="width:33%">row1</th>
<th style="width:33%">row1</th>
<th style="width:33%">row1</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>t1-row1</td>
<td>t1-row1</td>
</tr>
<tr>
<td></td>
<td>t1-row2</td>
<td>t1-row2</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="odd" colspan="3">
<table class="childTable" >
<thead>
<tr>
<th style="width:33%">row2</th>
<th style="width:33%">row2</th>
<th style="width:33%">row2</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>t2-row1</td>
<td>t2-row1</td>
</tr>
<tr>
<td></td>
<td>t2-row2</td>
<td>t2-row2</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
thanks