Better way of clone and then replace some attributes with jQuery
The current code does essentially this:


Clone the dirtied first item and append to the end
Modify the dirtied first item to make it clean again


It would be better to use a clean prototype / template from which you can easily create clean new instances. Then the operations can become:


Move the dirtied first item to the end
Recreate the first item from the clean template


The first approach is not so good, because:


Cloning is always a suspicious operation. For example, you have to make sure that:

all fields correctly copied
no references accidentally leaked
deep objects correctly deep-copied: although this is not a concern in this specific example, but I'm adding it anyway as a reminder of general concerns about the concept of cloning

Reseting an object to a clean state is always a suspicious operation. For example, you have to make sure that:

all fields are correctly reset: often duplicating the same logic that must exist (explicitly or implicitly) in the initializer / constructor



The new approach doesn't have any of these tricky issues.
It's conceptually much cleaner, with much fewer hidden traps and bugs waiting to happen.