Answer the question
In order to leave comments, you need to log in
How to clear all input value in clone?
For example, I clone a div that has several inputs.
Everything is cloned correctly, except that the "val()" values of the inputs are also cloned.
How can this be avoided?
Let's say
<div>
<input name="name">
</div>
$('div').eq(0).clone.appentTo('body');
$('div').eq(0).find('input').eq(0).val(); // Петя
$('div').eq(1).find('input').eq(0).val(); // Петя
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question