diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-11-13 15:27:35 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-11-13 15:27:35 +0300 |
commit | f66490412a794eea7530fe3236aae45bdd72b720 (patch) | |
tree | fd7f00960a09ec1e02d067aa844fd573308be953 /src/wrap.js | |
parent | 3cc496ceecdbd76b6c556e85b12696f7c4c09dd5 (diff) | |
download | jquery-f66490412a794eea7530fe3236aae45bdd72b720.tar.gz jquery-f66490412a794eea7530fe3236aae45bdd72b720.zip |
Revert "Wrap: Support .unwrap( selector) for selective unwrapping"
This reverts commit 7b09235ceed57bbcc26fc2c76147eb4e95ebdb92.
Diffstat (limited to 'src/wrap.js')
-rw-r--r-- | src/wrap.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wrap.js b/src/wrap.js index 69c7cbf23..c85cd304e 100644 --- a/src/wrap.js +++ b/src/wrap.js @@ -63,11 +63,12 @@ jQuery.fn.extend( { } ); }, - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); } } ); |