mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed an issue with domManip where the incorrect clone fragments were being used for elements.
This commit is contained in:
parent
80a6a91347
commit
18ee5a93a2
@ -501,11 +501,12 @@ jQuery.fn = jQuery.prototype = {
|
||||
if ( this[0] ) {
|
||||
var fragment = document.createDocumentFragment(),
|
||||
scripts = jQuery.clean( args, this[0].ownerDocument, fragment ),
|
||||
first = fragment.firstChild;
|
||||
first = fragment.firstChild,
|
||||
extra = this.length > 1 ? fragment.cloneNode(true) : fragment;
|
||||
|
||||
if ( first )
|
||||
for ( var i = 0, l = this.length; i < l; i++ )
|
||||
callback.call( root(this[i], first), this.length > 1 ? fragment.cloneNode(true) : fragment );
|
||||
callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment );
|
||||
|
||||
if ( scripts )
|
||||
jQuery.each( scripts, evalScript );
|
||||
|
Loading…
Reference in New Issue
Block a user