Skip to content

Commit 27b4db5

Browse files
committed
Fixes jquery#381
1 parent c9bb505 commit 27b4db5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

entries/clone.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<desc>Create a deep copy of the set of matched elements.</desc>
2020
<longdesc>
2121
<p>The <code>.clone()</code> method performs a <em>deep</em> copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes.</p>
22+
<div class="warning">
23+
<p><strong>Note:</strong> For performance reasons, the dynamic state of certain form elements (e.g., user data typed into <code>textarea</code> and user selections made to a <code>select</code>) is not copied to the cloned elements. When cloning <code>input</code> elements, the dynamic state of the element (e.g., user data typed into text inputs and user selections made to a checkbox) is retained in the cloned elements.</p>
24+
</div>
2225
<p>When used in conjunction with one of the insertion methods, <code>.clone()</code> is a convenient way to duplicate elements on a page. Consider the following HTML:</p>
2326
<pre><code>
2427
&lt;div class="container"&gt;

0 commit comments

Comments
 (0)