how to update Sr. No. COLUMN after removing a TR from TABLE
- by user251336
i have a table like
<table>
<tr>
<td>Sr. No.</td>
<td> Name</td>
<td>$nbsp;</td>
</tr>
<tr>
<td>1</td>
<td>abc</td>
<td>remove button</td>
</tr>
<tr>
<td>2</td>
<td>xyz</td>
<td>remove button</td>
</tr>
<tr>
<td>3</td>
<td>def</td>
<td>remove button</td>
</tr>
onclick of ' remove button ' i send ajax request & after successful response i remove the respective TR using $('#id_of_tr').remove();.
till here everything goes fine but now i want to update Sr. No.s of each row. Because Initially order is 1 2 3 , when i remove second row then it becames 1 3 which i want to update it to 1 2.
I hope this would help.