aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2011-10-27 15:33:21 -0400
committerRick Waldron <waldron.rick@gmail.com>2011-10-27 15:33:21 -0400
commit33e98834fe209ab615379b0dc3e50976ebda283a (patch)
treedb8eebfd9ef3cfe558cd53ae1f58995a237af666
parent0804cdfe9a6e89cf8277971feac1f4322346a750 (diff)
downloadjquery-33e98834fe209ab615379b0dc3e50976ebda283a.tar.gz
jquery-33e98834fe209ab615379b0dc3e50976ebda283a.zip
Cleanup spacing in offset.js. Fixes #10601
-rw-r--r--src/offset.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/offset.js b/src/offset.js
index 4cc87acff..054869da6 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -154,7 +154,7 @@ jQuery.extend( jQuery.offset, {
curOffset = curElem.offset(),
curCSSTop = jQuery.css( elem, "top" ),
curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
props = {}, curPosition = {}, curTop, curLeft;
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
@@ -171,11 +171,11 @@ jQuery.extend( jQuery.offset, {
options = options.call( elem, i, curOffset );
}
- if (options.top != null) {
- props.top = (options.top - curOffset.top) + curTop;
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
}
- if (options.left != null) {
- props.left = (options.left - curOffset.left) + curLeft;
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
}
if ( "using" in options ) {