I have a dynamic form using jQuery. Rows are created based on the values from drop down(please check image) . Each row is created with a <p> tag and unique id. If I delete a row in between the id appended to all those rows after the deleted row should be decremented by 1.
For ex: if we have 1 to 10 rows each row identified as 1,2,3, .....10. If I delete 5th row then there should be no 10th row and series would be 1,2,3....9.
The values of all the remaining rows should be preserved. How can I do this using jQuery?