On Nov 9, 2006, at 12:21 PM, bmsterling wrote:

>
> 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?

Maybe something like this?

        $("#claims").clone().appendTo("#ap");
        $('#ap select').val("");


___________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to