Skip to content

Commit

Permalink
Cleanup spacing in attributes.js. Fixes #10601
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Oct 27, 2011
1 parent bad83b3 commit 9ea21fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/attributes.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jQuery.fn.extend({
} }


if ( (value && typeof value === "string") || value === undefined ) { if ( (value && typeof value === "string") || value === undefined ) {
classNames = (value || "").split( rspace ); classNames = ( value || "" ).split( rspace );


for ( i = 0, l = this.length; i < l; i++ ) { for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ]; elem = this[ i ];
Expand Down Expand Up @@ -320,7 +320,7 @@ jQuery.extend({
// Grab necessary hook if one is defined // Grab necessary hook if one is defined
if ( notxml ) { if ( notxml ) {
name = name.toLowerCase(); name = name.toLowerCase();
hooks = jQuery.attrHooks[ name ] || (rboolean.test( name ) ? boolHook : nodeHook); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
} }


if ( value !== undefined ) { if ( value !== undefined ) {
Expand Down Expand Up @@ -356,7 +356,7 @@ jQuery.extend({
i = 0; i = 0;


if ( elem.nodeType === 1 ) { if ( elem.nodeType === 1 ) {
attrNames = (value || "").split( rspace ); attrNames = ( value || "" ).split( rspace );
l = attrNames.length; l = attrNames.length;


for ( ; i < l; i++ ) { for ( ; i < l; i++ ) {
Expand Down Expand Up @@ -452,7 +452,7 @@ jQuery.extend({
return ret; return ret;


} else { } else {
return (elem[ name ] = value); return ( elem[ name ] = value );
} }


} else { } else {
Expand Down Expand Up @@ -530,7 +530,7 @@ if ( !getSetAttribute ) {
get: function( elem, name ) { get: function( elem, name ) {
var ret; var ret;
ret = elem.getAttributeNode( name ); ret = elem.getAttributeNode( name );
return ret && (fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified) ? return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
ret.nodeValue : ret.nodeValue :
undefined; undefined;
}, },
Expand All @@ -541,7 +541,7 @@ if ( !getSetAttribute ) {
ret = document.createAttribute( name ); ret = document.createAttribute( name );
elem.setAttributeNode( ret ); elem.setAttributeNode( ret );
} }
return (ret.nodeValue = value + ""); return ( ret.nodeValue = value + "" );
} }
}; };


Expand Down Expand Up @@ -595,7 +595,7 @@ if ( !jQuery.support.style ) {
return elem.style.cssText.toLowerCase() || undefined; return elem.style.cssText.toLowerCase() || undefined;
}, },
set: function( elem, value ) { set: function( elem, value ) {
return (elem.style.cssText = "" + value); return ( elem.style.cssText = "" + value );
} }
}; };
} }
Expand Down Expand Up @@ -640,7 +640,7 @@ jQuery.each([ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
set: function( elem, value ) { set: function( elem, value ) {
if ( jQuery.isArray( value ) ) { if ( jQuery.isArray( value ) ) {
return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
} }
} }
}); });
Expand Down

0 comments on commit 9ea21fa

Please sign in to comment.