aboutsummaryrefslogtreecommitdiffstats
path: root/src/dimensions.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-06-06 23:35:16 -0400
committertimmywil <tim.willison@thisismedium.com>2011-06-06 23:35:16 -0400
commit75203de7435b7f32c69da1dde88aa6708bf6bb7d (patch)
treeaf3ca2da288b538472cee948a3e45f2d2f809a0a /src/dimensions.js
parent80ad14bd14467c547c2867f2677ca581aa29bf33 (diff)
downloadjquery-75203de7435b7f32c69da1dde88aa6708bf6bb7d.tar.gz
jquery-75203de7435b7f32c69da1dde88aa6708bf6bb7d.zip
Optimize width/height retrieval (moved logic to getWH, removed adjustWH). Supplements #9441, #9300.
Diffstat (limited to 'src/dimensions.js')
-rw-r--r--src/dimensions.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 8559056b5..88fa17506 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -1,12 +1,12 @@
(function( jQuery ) {
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
var type = name.toLowerCase();
// innerHeight and innerWidth
- jQuery.fn["inner" + name] = function() {
+ jQuery.fn[ "inner" + name ] = function() {
var elem = this[0];
return elem && elem.style ?
parseFloat( jQuery.css( elem, type, "padding" ) ) :
@@ -14,7 +14,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
};
// outerHeight and outerWidth
- jQuery.fn["outer" + name] = function( margin ) {
+ jQuery.fn[ "outer" + name ] = function( margin ) {
var elem = this[0];
return elem && elem.style ?
parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :