scratch
/bower_components/jquery/src/wrap.js |
@@ -5,17 +5,18 @@ |
"./traversing" // parent, contents |
], function( jQuery ) { |
|
"use strict"; |
|
jQuery.fn.extend( { |
wrapAll: function( html ) { |
var wrap; |
|
if ( this[ 0 ] ) { |
if ( jQuery.isFunction( html ) ) { |
html = html.call( this[ 0 ] ); |
return this.each(function( i ) { |
jQuery( this ).wrapAll( html.call(this, i) ); |
}); |
} |
|
if ( this[ 0 ] ) { |
|
// The elements to wrap the target around |
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); |
|
@@ -65,12 +66,13 @@ |
} ); |
}, |
|
unwrap: function( selector ) { |
this.parent( selector ).not( "body" ).each( function() { |
unwrap: function() { |
return this.parent().each(function() { |
if ( !jQuery.nodeName( this, "body" ) ) { |
jQuery( this ).replaceWith( this.childNodes ); |
} ); |
return this; |
} |
}).end(); |
} |
} ); |
|
return jQuery; |