From 2c0f4e1114e3ad6a93a07b8e6bec6cb73aa40493 Mon Sep 17 00:00:00 2001 From: Ed S Date: Tue, 22 Apr 2014 00:23:38 -0700 Subject: [PATCH] Only use default pos if top/left are undefined Allows 0 (which is falsey) to be passed as an offsets. Fixes #141 --- src/jquery.uls.core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jquery.uls.core.js b/src/jquery.uls.core.js index fe48a55..6a9536e 100644 --- a/src/jquery.uls.core.js +++ b/src/jquery.uls.core.js @@ -149,8 +149,8 @@ height: this.$element[0].offsetHeight } ); return { - top: this.top || pos.top + pos.height, - left: this.left || '25%' + top: this.top !== undefined ? this.top : pos.top + pos.height, + left: this.left !== undefined ? this.left : '25%' }; },