John Aggyer John Aggyer - 6 months ago 15
jQuery Question

colspan with jquery?

I have this nested table structure. Is it possible to merge 111 and 222? i would like to delete the lines between 111 and 222 . Maybe I need to use jQuery?

The output I want:

111 222 | aaa | aaa | aaa | aaa | aaa | aaa


This is how the markup looks:

<table border="1">
<tr>
<td>
<table border="1">
<tr>
<td></td>
<td>111</td>
</tr>
</table>
</td>
<td>222</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
</tr>
</table>


http://jsfiddle.net/bZQNM/1/

Answer

This html should remove the border between 111 and 222 -

<table border="1">  
    <tr>
    <td style="border-right-style:none"><table border="0"><tr><td></td><td>111</td></tr></table></td>
    <td style="border-left-style:none">222</td>
    <td>aaa</td>
    <td>aaa</td>
    <td>aaa</td>
    <td>aaa</td>
    <td>aaa</td>
    <td>aaa</td>
    </tr>
</table>

Working demo - http://jsfiddle.net/dnfJ5/4/