I have a form that shows a project and all the systems associated to that project. Each system has details which can be updated and once the updates are done (e.g. Location, hardware type, etc), you click the Save button and it will save the changes. There is also a delete button to (you guessed it) delete a system from the project (the system is deleted via an ajax call and upon successful deletion, the system is removed from view via jQuery hide function). Now here is the odd part. When the save changes button is pressed, the deleted item will be saved BACK into the project.
My question is, does the .hide() actually remove it from the form or is it just hiding the system from the user? If yes, what should I be using so that the system doesn’t get added back once the save changes button is depressed?
Try
$.detach()or$.remove()jQuery Documentation – detach
jQuery Documentation – remove