Update bower dependencies.
This commit is contained in:
parent
818bdad5af
commit
2beab45f32
185 changed files with 21480 additions and 8110 deletions
|
@ -1,10 +1,11 @@
|
|||
define( [
|
||||
"../core",
|
||||
"../core/stripAndCollapse",
|
||||
"../var/isFunction",
|
||||
"../var/rnothtmlwhite",
|
||||
"../data/var/dataPriv",
|
||||
"../core/init"
|
||||
], function( jQuery, stripAndCollapse, rnothtmlwhite, dataPriv ) {
|
||||
], function( jQuery, stripAndCollapse, isFunction, rnothtmlwhite, dataPriv ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -12,20 +13,30 @@ function getClass( elem ) {
|
|||
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
||||
}
|
||||
|
||||
function classesToArray( value ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
return value;
|
||||
}
|
||||
if ( typeof value === "string" ) {
|
||||
return value.match( rnothtmlwhite ) || [];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
jQuery.fn.extend( {
|
||||
addClass: function( value ) {
|
||||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
||||
} );
|
||||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
classes = classesToArray( value );
|
||||
|
||||
if ( classes.length ) {
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
@ -54,7 +65,7 @@ jQuery.fn.extend( {
|
|||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
||||
} );
|
||||
|
@ -64,9 +75,9 @@ jQuery.fn.extend( {
|
|||
return this.attr( "class", "" );
|
||||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
classes = classesToArray( value );
|
||||
|
||||
if ( classes.length ) {
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
|
||||
|
@ -96,13 +107,14 @@ jQuery.fn.extend( {
|
|||
},
|
||||
|
||||
toggleClass: function( value, stateVal ) {
|
||||
var type = typeof value;
|
||||
var type = typeof value,
|
||||
isValidValue = type === "string" || Array.isArray( value );
|
||||
|
||||
if ( typeof stateVal === "boolean" && type === "string" ) {
|
||||
if ( typeof stateVal === "boolean" && isValidValue ) {
|
||||
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
||||
}
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( i ) {
|
||||
jQuery( this ).toggleClass(
|
||||
value.call( this, i, getClass( this ), stateVal ),
|
||||
|
@ -114,12 +126,12 @@ jQuery.fn.extend( {
|
|||
return this.each( function() {
|
||||
var className, i, self, classNames;
|
||||
|
||||
if ( type === "string" ) {
|
||||
if ( isValidValue ) {
|
||||
|
||||
// Toggle individual class names
|
||||
i = 0;
|
||||
self = jQuery( this );
|
||||
classNames = value.match( rnothtmlwhite ) || [];
|
||||
classNames = classesToArray( value );
|
||||
|
||||
while ( ( className = classNames[ i++ ] ) ) {
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ define( [
|
|||
"../core/stripAndCollapse",
|
||||
"./support",
|
||||
"../core/nodeName",
|
||||
"../var/isFunction",
|
||||
|
||||
"../core/init"
|
||||
], function( jQuery, stripAndCollapse, support, nodeName ) {
|
||||
], function( jQuery, stripAndCollapse, support, nodeName, isFunction ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -13,7 +14,7 @@ var rreturn = /\r/g;
|
|||
|
||||
jQuery.fn.extend( {
|
||||
val: function( value ) {
|
||||
var hooks, ret, isFunction,
|
||||
var hooks, ret, valueIsFunction,
|
||||
elem = this[ 0 ];
|
||||
|
||||
if ( !arguments.length ) {
|
||||
|
@ -42,7 +43,7 @@ jQuery.fn.extend( {
|
|||
return;
|
||||
}
|
||||
|
||||
isFunction = jQuery.isFunction( value );
|
||||
valueIsFunction = isFunction( value );
|
||||
|
||||
return this.each( function( i ) {
|
||||
var val;
|
||||
|
@ -51,7 +52,7 @@ jQuery.fn.extend( {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( isFunction ) {
|
||||
if ( valueIsFunction ) {
|
||||
val = value.call( this, i, jQuery( this ).val() );
|
||||
} else {
|
||||
val = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue