<table>
<tr>
<td>aaa</td>
<td>111</td>
</tr>
<tr>
<td>aaa</td>
<td>222</td>
</tr>
<tr>
<td>bbb</td>
<td>111</td>
</tr>
<tr>
<td>bbb</td>
<td>222</td>
</tr>
</table>
In this example second row first cell value ‘aaa’ and third row first cell value ‘bbb’ are not same. Now How to add a new table row between second row and third row.
You can use $() to create elements from markup, and insertBefore() to add them before a specific element: