Skip to content

Commit 2152cf5

Browse files
jugglinmikekswedberg
authored andcommitted
Insertion methods: Correct description of insertion cloning behavior.
Closes gh-438
1 parent 2b156c2 commit 2152cf5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

entries/after.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $( ".container" ).after( $( "h2" ) );
6060
</div>
6161
<h2>Greetings</h2>
6262
</code></pre>
63-
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.</p>
63+
<p><strong>Important</strong>: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.</p>
6464
<h4 id="disconnected-dom-nodes">Inserting Disconnected DOM nodes</h4>
6565
<p>As of jQuery 1.4, <code>.before()</code> and <code>.after()</code> will also work on disconnected DOM nodes. For example, given the following code:</p>
6666
<pre><code>$( "&lt;div&gt;&lt;/div&gt;" ).after( "&lt;p&gt;&lt;/p&gt;" );</code></pre>

entries/append.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $( ".container" ).append( $( "h2" ) );
6666
&lt;h2&gt;Greetings&lt;/h2&gt;
6767
&lt;/div&gt;
6868
</code></pre>
69-
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.</p>
69+
<p><strong>Important</strong>: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.</p>
7070
<h4 id="additional-arguments">Additional Arguments</h4>
7171
<p>Similar to other content-adding methods such as <code><a href="/prepend/">.prepend()</a></code> and <code><a href="/before/">.before()</a></code>, <code>.append()</code> also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.</p>
7272
<p>For example, the following will insert two new <code>&lt;div&gt;</code>s and an existing <code>&lt;div&gt;</code> as the last three child nodes of the body:</p>

entries/before.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ $( ".container" ).before( $( "h2" ) );
6262
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
6363
&lt;/div&gt;
6464
</code></pre>
65-
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.</p>
65+
<p><strong>Important</strong>: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.</p>
6666
<p>In jQuery 1.4, <code>.before()</code> and <code>.after()</code> will also work on disconnected DOM nodes:</p>
6767
<pre><code>
6868
$( "&lt;div&gt;" ).before( "&lt;p&gt;&lt;/p&gt;" );

entries/prepend.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $( ".container" ).prepend( $( "h2" ) );
6666
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
6767
&lt;/div&gt;
6868
</code></pre>
69-
<p><strong>Important</strong>: If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.</p>
69+
<p><strong>Important</strong>: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.</p>
7070
<h4 id="additional-arguments">Additional Arguments</h4>
7171
<p>Similar to other content-adding methods such as <code><a href="/append/">.append()</a></code> and <code><a href="/before/">.before()</a></code>, <code>.prepend()</code> also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.</p>
7272
<p>For example, the following will insert two new <code>&lt;div&gt;</code>s and an existing <code>&lt;div&gt;</code> as the first three child nodes of the body:</p>

0 commit comments

Comments
 (0)