Fix #11566, allow appending to DocumentFragment, closes gh-814.

This commit is contained in:
Vladimir Zhuravlev
2012-06-15 21:37:01 -04:00
committed by Dave Methvin
parent 0b352f6cb5
commit 9c28a320c3
2 changed files with 80 additions and 46 deletions

View File

@@ -127,7 +127,7 @@ jQuery.fn.extend({
append: function() {
return this.domManip(arguments, true, function( elem ) {
if ( this.nodeType === 1 ) {
if ( this.nodeType === 1 || this.nodeType === 11 ) {
this.appendChild( elem );
}
});
@@ -135,7 +135,7 @@ jQuery.fn.extend({
prepend: function() {
return this.domManip(arguments, true, function( elem ) {
if ( this.nodeType === 1 ) {
if ( this.nodeType === 1 || this.nodeType === 11 ) {
this.insertBefore( elem, this.firstChild );
}
});