diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 12:55:56 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 13:54:01 -0500 |
commit | 6b1b0a26b4d485b4d9f334286efed5dfe33e3f3f (patch) | |
tree | 54f520ec6491fef8e7fa0b6027e1ec38d49c8253 /src/manipulation.js | |
parent | 13468abaeb5488d547bc75d99bc3425ee891859e (diff) | |
download | jquery-6b1b0a26b4d485b4d9f334286efed5dfe33e3f3f.tar.gz jquery-6b1b0a26b4d485b4d9f334286efed5dfe33e3f3f.zip |
Fix #13233: re-allow .replaceWith of text nodes. Close gh-1137.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 9f1ecfa7f..34309d0c9 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -269,15 +269,9 @@ jQuery.fn.extend({ var next = this.nextSibling, parent = this.parentNode; - if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { - + if ( parent ) { jQuery( this ).remove(); - - if ( next ) { - next.parentNode.insertBefore( elem, next ); - } else { - parent.appendChild( elem ); - } + parent.insertBefore( elem, next ); } }); }, |