The following example in http://api.jquery.com/after/#disconnected-dom-nodes:
$( "<div></div>" )
.after( "<p></p>" )
.addClass( "foo" )
.filter( "p" )
.attr( "id", "bar" )
.html( "hello" )
.end()
.appendTo( "body" );
claims that the following should have been added to the body:
<div class="foo"></div>
<p class="foo" id="bar">hello</p>
using jQuery > 1.4. However, trying this example in jQuery 1.9.1 (on the jQuery documentation page itself), only the <div> gets added to the body:
Therefore, the example appears to be incorrect or there's a bug in the framework.
The following example in http://api.jquery.com/after/#disconnected-dom-nodes:
claims that the following should have been added to the body:
using jQuery > 1.4. However, trying this example in jQuery 1.9.1 (on the jQuery documentation page itself), only the
<div>gets added to the body:Therefore, the example appears to be incorrect or there's a bug in the framework.