diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2012-08-24 11:57:48 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-08-24 11:57:48 -0400 |
commit | a5be98620665c8af4d21a043a871e6a965de4fbc (patch) | |
tree | 19eafba46df27bccadd3541e8a300cbd91a97325 /src/manipulation.js | |
parent | e2eac3f4d2e7f47b67635704df8e3b6675a91ed6 (diff) | |
download | jquery-a5be98620665c8af4d21a043a871e6a965de4fbc.tar.gz jquery-a5be98620665c8af4d21a043a871e6a965de4fbc.zip |
Revert "Fix #12120. Always stack .before/.after, and fix disconnected nodes."
This reverts commit e2eac3f4d2e7f47b67635704df8e3b6675a91ed6.
There is a 1.7 regression with isDisconnected() that we should fix before tackling this.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 67c6c06f0..f87e3ca94 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -148,7 +148,10 @@ jQuery.fn.extend({ }); } - return this.pushStack( jQuery.merge( jQuery.clean( arguments ), this ), "before", this.selector ); + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); + } }, after: function() { @@ -158,7 +161,10 @@ jQuery.fn.extend({ }); } - return this.pushStack( jQuery.merge( this.toArray(), jQuery.clean( arguments ) ), "after", this.selector ); + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); + } }, // keepData is for internal use only--do not document @@ -715,7 +721,6 @@ jQuery.extend({ // Fix #11356: Clear elements from safeFragment if ( div ) { - div.innerHTML = ""; safe.removeChild( div ); elem = div = safe = null; } |