]> source.dussan.org Git - jquery.git/commitdiff
Fix domManip leaks the first element when appending elements to multiple other elements.
authorColin Snover <github.com@zetafleet.com>
Sun, 9 Jan 2011 21:56:40 +0000 (15:56 -0600)
committerColin Snover <github.com@zetafleet.com>
Sun, 9 Jan 2011 21:56:40 +0000 (15:56 -0600)
src/manipulation.js

index 657aef7d1fc2891f67930ffa98fbb82418d08302..206476c2deb26db35f56642fb7ba8b074fcb25fc 100644 (file)
@@ -346,7 +346,7 @@ jQuery.fn.extend({
                                                table ?
                                                        root(this[i], first) :
                                                        this[i],
-                                               i > 0 || results.cacheable || this.length > 1  ?
+                                               i > 0 || results.cacheable || (this.length > 1 && i > 0) ?
                                                        jQuery(fragment).clone(true)[0] :
                                                        fragment
                                        );