diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 21:20:16 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 21:20:16 +0300 |
commit | 71c7c8d0ba2dbf8a2a8f160248bc6fa5be25cc32 (patch) | |
tree | f671e2e8d2f38e19d14801cf7f33f12c12bc3777 /src | |
parent | 7cfa4b26bc96c07254ba036a3a957421e4e43786 (diff) | |
download | jquery-71c7c8d0ba2dbf8a2a8f160248bc6fa5be25cc32.tar.gz jquery-71c7c8d0ba2dbf8a2a8f160248bc6fa5be25cc32.zip |
Revert "Wrap: Support .unwrap( selector) for selective unwrapping"
This reverts commit e38138af6ac3fa850a092adf09366a68850189a8.
Diffstat (limited to 'src')
-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 e50431116..b377a8739 100644 --- a/src/wrap.js +++ b/src/wrap.js @@ -64,11 +64,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(); } } ); |