Oops--one change:
/* create unique name & id
*/
newElem.children('input:first')
.attr('name', 'foo')
.attr('id', 'foo')
.attr('value', '');
There's no sense giving it a name &
It looks the problem stems from non-unique IDs for your cloned
elements. So, the first thing to do is to get rid of those and use an
indexing method.
Title
Question:
Hi,
I have two issues the following script.
1. The delete button will only delete the first form element. The rest
of the delete buttons do nothing.
2. The add button adds a new element after the first one. I need it to
add it at the end of the list (i.e. always last).
The jquery is:
//Add a ne
3 matches
Mail list logo