Lots of updates

This commit is contained in:
baldo 2016-05-16 13:33:49 +02:00
commit 39e7af6238
454 changed files with 221168 additions and 36622 deletions

View file

@ -96,8 +96,6 @@ jQuery.extend({
set: function( elem, value ) {
if ( !support.radioValue && value === "radio" &&
jQuery.nodeName( elem, "input" ) ) {
// Setting the type on a radio button after the value resets the value in IE6-9
// Reset value to default in case type is set after value during creation
var val = elem.value;
elem.setAttribute( "type", value );
if ( val ) {

View file

@ -83,7 +83,7 @@ jQuery.fn.extend({
}
}
// only assign if different to avoid unneeded rendering.
// Only assign if different to avoid unneeded rendering.
finalValue = value ? jQuery.trim( cur ) : "";
if ( elem.className !== finalValue ) {
elem.className = finalValue;
@ -110,14 +110,14 @@ jQuery.fn.extend({
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
// Toggle individual class names
var className,
i = 0,
self = jQuery( this ),
classNames = value.match( rnotwhite ) || [];
while ( (className = classNames[ i++ ]) ) {
// check each className given, space separated list
// Check each className given, space separated list
if ( self.hasClass( className ) ) {
self.removeClass( className );
} else {
@ -132,7 +132,7 @@ jQuery.fn.extend({
data_priv.set( this, "__className__", this.className );
}
// If the element has a class name or if we're passed "false",
// If the element has a class name or if we're passed `false`,
// then remove the whole classname (if there was one, the above saved it).
// Otherwise bring back whatever was previously saved (if anything),
// falling back to the empty string if nothing was stored.

View file

@ -28,7 +28,7 @@ jQuery.extend({
var ret, hooks, notxml,
nType = elem.nodeType;
// don't get/set properties on text, comment and attribute nodes
// Don't get/set properties on text, comment and attribute nodes
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
return;
}
@ -64,8 +64,6 @@ jQuery.extend({
}
});
// Support: IE9+
// Selectedness for an option in an optgroup can be inaccurate
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {

View file

@ -9,21 +9,21 @@ define([
input.type = "checkbox";
// Support: iOS 5.1, Android 4.x, Android 2.3
// Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
// Support: iOS<=5.1, Android<=4.2+
// Default value for a checkbox should be "on"
support.checkOn = input.value !== "";
// Must access the parent to make an option select properly
// Support: IE9, IE10
// Support: IE<=11+
// Must access selectedIndex to make default options select
support.optSelected = opt.selected;
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as disabled)
// Support: Android<=2.3
// Options inside disabled selects are incorrectly marked as disabled
select.disabled = true;
support.optDisabled = !opt.disabled;
// Check if an input maintains its value after becoming a radio
// Support: IE9, IE10
// Support: IE<=11+
// An input loses its value after becoming a radio
input = document.createElement( "input" );
input.value = "t";
input.type = "radio";

View file

@ -22,9 +22,9 @@ jQuery.fn.extend({
ret = elem.value;
return typeof ret === "string" ?
// handle most common string cases
// Handle most common string cases
ret.replace(rreturn, "") :
// handle cases where value is null/undef or number
// Handle cases where value is null/undef or number
ret == null ? "" : ret;
}
@ -132,7 +132,7 @@ jQuery.extend({
}
}
// force browsers to behave consistently when non-matching value is set
// Force browsers to behave consistently when non-matching value is set
if ( !optionSet ) {
elem.selectedIndex = -1;
}
@ -153,8 +153,6 @@ jQuery.each([ "radio", "checkbox" ], function() {
};
if ( !support.checkOn ) {
jQuery.valHooks[ this ].get = function( elem ) {
// Support: Webkit
// "" is returned instead of "on" if a value isn't specified
return elem.getAttribute("value") === null ? "on" : elem.value;
};
}