release candidate

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-30 17:48:05 +01:00
parent 13bd34d2b3
commit 3983d1fdaf
232 changed files with 24427 additions and 11080 deletions
+24 -26
View File
@@ -1,21 +1,20 @@
define([
define( [
"./core",
"./core/init",
"./manipulation", // clone
"./traversing" // parent, contents
], function( jQuery ) {
jQuery.fn.extend({
"use strict";
jQuery.fn.extend( {
wrapAll: function( html ) {
var wrap;
if ( jQuery.isFunction( html ) ) {
return this.each(function( i ) {
jQuery( this ).wrapAll( html.call(this, i) );
});
}
if ( this[ 0 ] ) {
if ( jQuery.isFunction( html ) ) {
html = html.call( this[ 0 ] );
}
// The elements to wrap the target around
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
@@ -24,7 +23,7 @@ jQuery.fn.extend({
wrap.insertBefore( this[ 0 ] );
}
wrap.map(function() {
wrap.map( function() {
var elem = this;
while ( elem.firstElementChild ) {
@@ -32,7 +31,7 @@ jQuery.fn.extend({
}
return elem;
}).append( this );
} ).append( this );
}
return this;
@@ -40,12 +39,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();
@@ -55,25 +54,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() {
return this.parent().each(function() {
if ( !jQuery.nodeName( this, "body" ) ) {
jQuery( this ).replaceWith( this.childNodes );
}
}).end();
unwrap: function( selector ) {
this.parent( selector ).not( "body" ).each( function() {
jQuery( this ).replaceWith( this.childNodes );
} );
return this;
}
});
} );
return jQuery;
});
} );