aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrap.js')
-rw-r--r--src/wrap.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/wrap.js b/src/wrap.js
index 0d9bf0f2e..69c7cbf23 100644
--- a/src/wrap.js
+++ b/src/wrap.js
@@ -1,11 +1,11 @@
-define([
+define( [
"./core",
"./core/init",
"./manipulation", // clone
"./traversing" // parent, contents
], function( jQuery ) {
-jQuery.fn.extend({
+jQuery.fn.extend( {
wrapAll: function( html ) {
var wrap;
@@ -21,7 +21,7 @@ jQuery.fn.extend({
wrap.insertBefore( this[ 0 ] );
}
- wrap.map(function() {
+ wrap.map( function() {
var elem = this;
while ( elem.firstElementChild ) {
@@ -29,7 +29,7 @@ jQuery.fn.extend({
}
return elem;
- }).append( this );
+ } ).append( this );
}
return this;
@@ -37,12 +37,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,24 +52,24 @@ 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( selector ) {
- this.parent( selector ).not( "body" ).each(function() {
+ this.parent( selector ).not( "body" ).each( function() {
jQuery( this ).replaceWith( this.childNodes );
- });
+ } );
return this;
}
-});
+} );
return jQuery;
-});
+} );