Re: [jQuery] Add/Delete form elements

2009-11-22 Thread brian
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 &

Re: [jQuery] Add/Delete form elements

2009-11-22 Thread brian
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:

[jQuery] Add/Delete form elements

2009-11-22 Thread tomh88
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