Skip to content

Commit d70ba75

Browse files
committed
after(): Remove section regarding disconnected DOM nodes
Fixes gh-559
1 parent 98b2b38 commit d70ba75

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

entries/after.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<return>
2727
<type name="htmlString"/>
2828
<type name="Element"/>
29-
<type name="jQuery"/>
29+
<type name="jQuery"/>
3030
</return>
3131
</argument>
3232
</signature>
@@ -80,25 +80,6 @@ $( ".container" ).after( $( "h2" ) );
8080
&lt;h2&gt;Greetings&lt;/h2&gt;
8181
</code></pre>
8282
<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>
83-
<h4 id="disconnected-dom-nodes">Inserting Disconnected DOM nodes</h4>
84-
<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>
85-
<pre><code>$( "&lt;div&gt;&lt;/div&gt;" ).after( "&lt;p&gt;&lt;/p&gt;" );</code></pre>
86-
<p>The result is a jQuery set containing a div and a paragraph, in that order. That set can be further manipulated, even before it is inserted in the document.</p>
87-
<pre><code>
88-
$( "&lt;div&gt;&lt;/div&gt;" )
89-
.after( "&lt;p&gt;&lt;/p&gt;" )
90-
.addClass( "foo" )
91-
.filter( "p" )
92-
.attr( "id", "bar" )
93-
.html( "hello" )
94-
.end()
95-
.appendTo( "body" );
96-
</code></pre>
97-
<p>This results in the following elements inserted just before the closing <code>&lt;/body&gt;</code> tag:</p>
98-
<pre><code>
99-
&lt;div class="foo"&gt;&lt;/div&gt;
100-
&lt;p class="foo" id="bar"&gt;hello&lt;/p&gt;
101-
</code></pre>
10283
<h4 id="passing-a-function">Passing a Function</h4>
10384
<p>As of jQuery 1.4, <code>.after()</code> supports passing a function that returns the elements to insert.</p>
10485
<pre><code>

0 commit comments

Comments
 (0)