I have a table. see my table structure
<table width="100%" border="1">
<tr>
<td width="2%"><h2># SL NO</h2></td>
<td width="70%"><h2>Name</h2></td>
<td width="15%"><h2>Edit</h2></td>
<td width="13%"><h2>Delete</h2></td>
</tr>
<tr id="id0">
<td >1</td>
<td>XXXXXXX</td>
<td><a href="#"><img src="../images/icon_edit.gif" alt="Edit" /></a></td>
<td width="13%"><a href="#"><img src="../images/delete_07.png" alt="Delete" onclick="fnDeleteState(0)" /></a></td>
</tr>
<tr id="id1">
<td>2</td>
<td>XXXXXXX</td>
<td><a href="#"><img src="../images/icon_edit.gif" alt="Edit" /></a></td>
<td%"><a href="#"><img src="../images/delete_07.png" alt="Delete" onclick="fnDeleteState(1)" /></a></td>
</tr>
…
….
..
When press on the delete button i need to hide that row I have used this to remove particular row from the table
$("#id" + i).remove();
Its working fine. But the serial number… i’s display as wrong. I.e. when I delete second row the serial number with in the third row is still 3 I need to display this s 2 and so on…
I there is any way to do this in jquery
Thanks in advance
1 Answer