aboutsummaryrefslogtreecommitdiffstats
path: root/bower_components/jquery/src/wrap.js
diff options
context:
space:
mode:
authorLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
committerLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
commit1ad5102b7ddd181bb9c632b124d3ea4c7db28be6 (patch)
tree73dda18465d0f4b8eb52d4482282a387c9f67c95 /bower_components/jquery/src/wrap.js
parentb67294f76809a681ff73f209ed691a3e3f00563d (diff)
parentffb671c61a24a9086343b54bad080e145ff33fc5 (diff)
Merge tag 'upstream/7.8.1'
Upstream version 7.8.1 # gpg: Firmado el mar 15 nov 2016 14:18:48 ART # gpg: usando RSA clave A6C7B88B9583046A11C5403E0B00FB6CEBE2D002 # gpg: Firma correcta de "Ulises Vitulli <dererk@debian.org>" [absoluta] # gpg: alias "Dererk <dererk@torproject.org>" [absoluta] # gpg: alias "Ulises Vitulli <uvitulli@fi.uba.ar>" [absoluta] # gpg: alias "Ulises Vitulli <dererk@satellogic.com>" [absoluta]
Diffstat (limited to 'bower_components/jquery/src/wrap.js')
-rw-r--r--bower_components/jquery/src/wrap.js47
1 files changed, 24 insertions, 23 deletions
diff --git a/bower_components/jquery/src/wrap.js b/bower_components/jquery/src/wrap.js
index 93c7b2c..780a486 100644
--- a/bower_components/jquery/src/wrap.js
+++ b/bower_components/jquery/src/wrap.js
@@ -1,27 +1,28 @@
-define([
+define( [
"./core",
"./core/init",
"./manipulation", // clone
"./traversing" // parent, contents
], function( jQuery ) {
-jQuery.fn.extend({
+jQuery.fn.extend( {
wrapAll: function( html ) {
if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
+ return this.each( function( i ) {
+ jQuery( this ).wrapAll( html.call( this, i ) );
+ } );
}
- if ( this[0] ) {
+ if ( this[ 0 ] ) {
+
// The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+ var wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
}
- wrap.map(function() {
+ wrap.map( function() {
var elem = this;
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
@@ -29,7 +30,7 @@ jQuery.fn.extend({
}
return elem;
- }).append( this );
+ } ).append( this );
}
return this;
@@ -37,12 +38,12 @@ jQuery.fn.extend({
wrapInner: function( html ) {
if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
+ return this.each( function( i ) {
+ jQuery( this ).wrapInner( html.call( this, i ) );
+ } );
}
- return this.each(function() {
+ return this.each( function() {
var self = jQuery( this ),
contents = self.contents();
@@ -52,25 +53,25 @@ jQuery.fn.extend({
} else {
self.append( html );
}
- });
+ } );
},
wrap: function( html ) {
var isFunction = jQuery.isFunction( html );
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
+ return this.each( function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
+ } );
},
unwrap: function() {
- return this.parent().each(function() {
+ return this.parent().each( function() {
if ( !jQuery.nodeName( this, "body" ) ) {
jQuery( this ).replaceWith( this.childNodes );
}
- }).end();
+ } ).end();
}
-});
+} );
return jQuery;
-});
+} );