I have a problem and I have no idea how to solve it:
I have a table:
| A | B |
| D | C |
<table>
<tr>
<td>
A
</td>
<td>
B
</td>
</tr>
<tr>
<td>
C
</td>
<td>
D
</td>
</tr>
</table>
And now I need to add </tr><tr>
after each odd td. Result should be one column table:
| A |
| B |
| C |
| D |
I was already trying to make this work with jQuery $("#table tr > td:nth-child(odd)").after("</tr><tr>");
, but it doesn't work.
Can anyone advise?