Skip to content

Commit ec07526

Browse files
committed
jquery core: saving some bytes and fixing indentation inside jQuery.prop.
1 parent 456d8a6 commit ec07526

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/core.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ jQuery.fn = jQuery.prototype = {
427427

428428
html: function( value ) {
429429
return value == undefined ?
430-
(this.length ?
430+
(this[0] ?
431431
this[0].innerHTML :
432432
null) :
433433
this.empty().append( value );
@@ -504,9 +504,9 @@ jQuery.fn = jQuery.prototype = {
504504
this;
505505

506506
// execute all scripts after the elements have been injected
507-
if ( jQuery.nodeName( elem, "script" ) ) {
507+
if ( jQuery.nodeName( elem, "script" ) )
508508
scripts = scripts.add( elem );
509-
} else {
509+
else {
510510
// Remove any inner scripts for later evaluation
511511
if ( elem.nodeType == 1 )
512512
scripts = scripts.add( jQuery( "script", elem ).remove() );
@@ -745,14 +745,14 @@ jQuery.extend({
745745
},
746746

747747
prop: function( elem, value, type, i, name ) {
748-
// Handle executable functions
749-
if ( jQuery.isFunction( value ) )
750-
value = value.call( elem, i );
751-
752-
// Handle passing in a number to a CSS property
753-
return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
754-
value + "px" :
755-
value;
748+
// Handle executable functions
749+
if ( jQuery.isFunction( value ) )
750+
value = value.call( elem, i );
751+
752+
// Handle passing in a number to a CSS property
753+
return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
754+
value + "px" :
755+
value;
756756
},
757757

758758
className: {

0 commit comments

Comments
 (0)