Hey guys and gals,
I am trying to duplicate a set of form elements using:
$("#claims").clone().appendTo("#ap")
and
<div id="claims">
<div class="fieldlabel"><input type="text" class="contact"
name="claim[]"
value=""/></div>
<div class="fieldinput">
<select name="result[]">
<option value="denied">Denied</option>
<option value="granted">Granted</option>
<option value="remanded">Remanded</option>
</select>
</div>
<div class="clear padding"></div>
</div>
which works fine, but if there is text in the form element that also gets
duplicated. I tried:
$("#claims").clone().siblings(".contact").val("").appendTo("#ap")
and that give me an error.
Any tips?
thanks
--
View this message in context:
http://www.nabble.com/.clone-and-form-elements-tf2602974.html#a7262320
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/