aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2008-05-23 00:54:59 +0000
committerAriel Flesler <aflesler@gmail.com>2008-05-23 00:54:59 +0000
commitec075266e99e5b3875241341ec1c716fb81b72fc (patch)
tree317e1201b974b687b063c2a10141d12bfdc6c466
parent456d8a62ccf3244c58ace2b315694ad54cfc05e3 (diff)
downloadjquery-ec075266e99e5b3875241341ec1c716fb81b72fc.tar.gz
jquery-ec075266e99e5b3875241341ec1c716fb81b72fc.zip
jquery core: saving some bytes and fixing indentation inside jQuery.prop.
-rw-r--r--src/core.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core.js b/src/core.js
index 0b27f7428..fdf5072eb 100644
--- a/src/core.js
+++ b/src/core.js
@@ -427,7 +427,7 @@ jQuery.fn = jQuery.prototype = {
html: function( value ) {
return value == undefined ?
- (this.length ?
+ (this[0] ?
this[0].innerHTML :
null) :
this.empty().append( value );
@@ -504,9 +504,9 @@ jQuery.fn = jQuery.prototype = {
this;
// execute all scripts after the elements have been injected
- if ( jQuery.nodeName( elem, "script" ) ) {
+ if ( jQuery.nodeName( elem, "script" ) )
scripts = scripts.add( elem );
- } else {
+ else {
// Remove any inner scripts for later evaluation
if ( elem.nodeType == 1 )
scripts = scripts.add( jQuery( "script", elem ).remove() );
@@ -745,14 +745,14 @@ jQuery.extend({
},
prop: function( elem, value, type, i, name ) {
- // Handle executable functions
- if ( jQuery.isFunction( value ) )
- value = value.call( elem, i );
-
- // Handle passing in a number to a CSS property
- return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
- value + "px" :
- value;
+ // Handle executable functions
+ if ( jQuery.isFunction( value ) )
+ value = value.call( elem, i );
+
+ // Handle passing in a number to a CSS property
+ return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
+ value + "px" :
+ value;
},
className: {