aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/core.js b/src/core.js
index 6e1ed9e95..7ac4ad75b 100644
--- a/src/core.js
+++ b/src/core.js
@@ -418,31 +418,32 @@ jQuery.fn = jQuery.prototype = {
}
- } else
- return this.each(function(){
- if ( this.nodeType != 1 )
- return;
+ }
+
+ return this.each(function(){
+ if ( this.nodeType != 1 )
+ return;
- if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
- this.checked = (jQuery.inArray(this.value, value) >= 0 ||
- jQuery.inArray(this.name, value) >= 0);
+ if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
+ this.checked = (jQuery.inArray(this.value, value) >= 0 ||
+ jQuery.inArray(this.name, value) >= 0);
- else if ( jQuery.nodeName( this, "select" ) ) {
- var values = value.constructor == Array ?
- value :
- [ value ];
+ else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = value.constructor == Array ?
+ value :
+ [ value ];
- jQuery( "option", this ).each(function(){
- this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
- jQuery.inArray( this.text, values ) >= 0);
- });
+ jQuery( "option", this ).each(function(){
+ this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
+ jQuery.inArray( this.text, values ) >= 0);
+ });
- if ( !values.length )
- this.selectedIndex = -1;
+ if ( !values.length )
+ this.selectedIndex = -1;
- } else
- this.value = value;
- });
+ } else
+ this.value = value;
+ });
},
html: function( value ) {
@@ -971,9 +972,9 @@ jQuery.extend({
div.childNodes :
[];
- for ( var i = tbody.length - 1; i >= 0 ; --i )
- if ( jQuery.nodeName( tbody[ i ], "tbody" ) && !tbody[ i ].childNodes.length )
- tbody[ i ].parentNode.removeChild( tbody[ i ] );
+ for ( var j = tbody.length - 1; j >= 0 ; --j )
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
// IE completely kills leading whitespace when innerHTML is used
if ( /^\s/.test( elem ) )