aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2007-02-03 19:32:16 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2007-02-03 19:32:16 +0000
commitfd0f42bf5cf18d311db78680e4d28bc6ff1b016c (patch)
tree558f07065b1bf2a2f902f17b52500a333f5e9d44 /src
parent43f235f4257359dfcf9270cf31c56aa547d01fd3 (diff)
downloadjquery-fd0f42bf5cf18d311db78680e4d28bc6ff1b016c.tar.gz
jquery-fd0f42bf5cf18d311db78680e4d28bc6ff1b016c.zip
Small optimization to jQuery.prop, saving 2 or 3 bytes
Diffstat (limited to 'src')
-rw-r--r--src/jquery/jquery.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index e2a2a22c0..004d6341a 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -1281,10 +1281,9 @@ jQuery.extend({
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
// Handle passing in a number to a CSS property
- if ( value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) )
- return value + "px";
-
- return value;
+ return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
+ value + "px" :
+ value;
},
className: {