Skip to content

Commit b3a98ac

Browse files
committed
Specify that moving, not cloning, on insertion applies only to single elem inserted in single location
Fixes #140
1 parent ec840d5 commit b3a98ac

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

entries/after.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
&lt;/div&gt;</code></pre>
3838
<p>An element in the DOM can also be selected and inserted after another element:</p>
3939
<pre><code>$('.container').after($('h2'));</code></pre>
40-
<p>If an element selected this way is inserted elsewhere, it will be moved rather than cloned:</p>
40+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved rather than cloned:</p>
4141
<pre><code>&lt;div class="container"&gt;
4242
&lt;div class="inner"&gt;Hello&lt;/div&gt;
4343
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
@@ -95,4 +95,4 @@ $('p').first().after($newdiv1, [newdiv2, existingdiv1]);
9595
<category slug="manipulation/dom-insertion-outside"/>
9696
<category slug="version/1.0"/>
9797
<category slug="version/1.4"/>
98-
</entry>
98+
</entry>

entries/append.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<p>You can also select an element on the page and insert it into another:</p>
4848
<pre><code>$('.container').append($('h2'));
4949
</code></pre>
50-
<p>If an element selected this way is inserted elsewhere, it will be moved into the target (not cloned):</p>
50+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved into the target (not cloned):</p>
5151
<pre><code>&lt;div class="container"&gt;
5252
&lt;div class="inner"&gt;Hello&lt;/div&gt;
5353
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
@@ -100,4 +100,4 @@ $('body').append($newdiv1, [newdiv2, existingdiv1]);
100100
<category slug="manipulation/dom-insertion-inside"/>
101101
<category slug="version/1.0"/>
102102
<category slug="version/1.4"/>
103-
</entry>
103+
</entry>

entries/appendTo.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<p>We can also select an element on the page and insert it into another:</p>
3737
<pre><code>$('h2').appendTo($('.container'));
3838
</code></pre>
39-
<p>If an element selected this way is inserted elsewhere, it will be moved into the target (not cloned):</p>
39+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved into the target (not cloned):</p>
4040
<pre><code>&lt;div class="container"&gt;
4141
&lt;div class="inner"&gt;Hello&lt;/div&gt;
4242
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
@@ -55,4 +55,4 @@
5555
</example>
5656
<category slug="manipulation/dom-insertion-inside"/>
5757
<category slug="version/1.0"/>
58-
</entry>
58+
</entry>

entries/before.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
&lt;/div&gt;</code></pre>
3939
<p>You can also select an element on the page and insert it before another:</p>
4040
<pre><code>$('.container').before($('h2'));</code></pre>
41-
<p>If an element selected this way is inserted elsewhere, it will be moved before the target (not cloned):</p>
41+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved before the target (not cloned):</p>
4242
<pre><code>&lt;h2&gt;Greetings&lt;/h2&gt;
4343
&lt;div class="container"&gt;
4444
&lt;div class="inner"&gt;Hello&lt;/div&gt;
@@ -80,4 +80,4 @@ $('p').first().before($newdiv1, [newdiv2, existingdiv1]);
8080
<category slug="manipulation/dom-insertion-outside"/>
8181
<category slug="version/1.0"/>
8282
<category slug="version/1.4"/>
83-
</entry>
83+
</entry>

entries/insertAfter.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
&lt;/div&gt;</code></pre>
2929
<p>We can also select an element on the page and insert it after another:</p>
3030
<pre><code>$('h2').insertAfter($('.container'));</code></pre>
31-
<p>If an element selected this way is inserted elsewhere, it will be moved after the target (not cloned):</p>
31+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved after the target (not cloned):</p>
3232
<pre><code>&lt;div class="container"&gt;
3333
&lt;div class="inner"&gt;Hello&lt;/div&gt;
3434
&lt;div class="inner"&gt;Goodbye&lt;/div&gt;
@@ -44,4 +44,4 @@
4444
</example>
4545
<category slug="manipulation/dom-insertion-outside"/>
4646
<category slug="version/1.0"/>
47-
</entry>
47+
</entry>

entries/insertBefore.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
&lt;/div&gt;</code></pre>
2929
<p>We can also select an element on the page and insert it before another:</p>
3030
<pre><code>$('h2').insertBefore($('.container'));</code></pre>
31-
<p>If an element selected this way is inserted elsewhere, it will be moved before the target (not cloned):</p>
31+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved before the target (not cloned):</p>
3232
<pre><code>&lt;h2&gt;Greetings&lt;/h2&gt;
3333
&lt;div class="container"&gt;
3434
&lt;div class="inner"&gt;Hello&lt;/div&gt;
@@ -44,4 +44,4 @@
4444
</example>
4545
<category slug="manipulation/dom-insertion-outside"/>
4646
<category slug="version/1.0"/>
47-
</entry>
47+
</entry>

entries/prepend.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
&lt;/div&gt;</code></pre>
4343
<p>You can also select an element on the page and insert it into another:</p>
4444
<pre><code>$('.container').prepend($('h2'));</code></pre>
45-
<p>If <em>a single element</em> selected this way is inserted elsewhere, it will be moved into the target (<em>not cloned</em>):</p>
45+
<p>If <em>a single element</em> selected this way is inserted into a single location elsewhere in the DOM, it will be moved into the target (<em>not cloned</em>):</p>
4646
<pre><code>&lt;div class="container"&gt;
4747
&lt;h2&gt;Greetings&lt;/h2&gt;
4848
&lt;div class="inner"&gt;Hello&lt;/div&gt;
@@ -84,4 +84,4 @@ $('body').prepend($newdiv1, [newdiv2, existingdiv1]);
8484
<category slug="manipulation/dom-insertion-inside"/>
8585
<category slug="version/1.0"/>
8686
<category slug="version/1.4"/>
87-
</entry>
87+
</entry>

entries/prependTo.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
&lt;/div&gt;</code></pre>
3333
<p>We can also select an element on the page and insert it into another:</p>
3434
<pre><code>$('h2').prependTo($('.container'));</code></pre>
35-
<p>If an element selected this way is inserted elsewhere, it will be moved into the target (not cloned):</p>
35+
<p>If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved into the target (not cloned):</p>
3636
<pre><code>&lt;div class="container"&gt;
3737
&lt;h2&gt;Greetings&lt;/h2&gt;
3838
&lt;div class="inner"&gt;Hello&lt;/div&gt;
@@ -50,4 +50,4 @@
5050
</example>
5151
<category slug="manipulation/dom-insertion-inside"/>
5252
<category slug="version/1.0"/>
53-
</entry>
53+
</entry>

0 commit comments

Comments
 (0)