Dynamically remove row and update indices
I have a page where a user can add a row of information:
<div id="refItem">
FirstName
LastName
</div>
users can keep pressing the add button and it will then keep appending to
that div another row of data by manipulating the DOM. It also updates the
ViewModel collection indices too. The ViewModel contains a collection of
which has, FirstName and LastName as above
When the View loads, it uses the Model to render the data as above (so
imagine a for loop rendering the row of data)
Question:
How can I delete the row from client side and update the indices at the
same time before the user hits the submit button? what JQuery do I need to
get hold of the row to delete and then update the DOM?
No comments:
Post a Comment