Skip to content
Permalink
Browse files

Fixed an issue with domManip where the incorrect clone fragments were…

… being used for elements.
  • Loading branch information
jeresig committed Dec 19, 2008
1 parent 80a6a91 commit 18ee5a93a2d940789d57544da5f61324bd55e3ec
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core.js
@@ -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 );

0 comments on commit 18ee5a9

Please sign in to comment.
You can’t perform that action at this time.