From fec455dbfcbfbdd78da9367ec39f1bb9a940d84a Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Wed, 31 Jul 2013 20:40:03 -0700 Subject: [PATCH] use jQuery to detect if body/calendar-element is visible and ready for rendering --- src/Calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Calendar.js b/src/Calendar.js index d4cbeb6..972b1f0 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -127,12 +127,12 @@ function Calendar(element, options, eventSources) { function elementVisible() { - return _element.offsetWidth !== 0; + return element.is(':visible'); } function bodyVisible() { - return $('body')[0].offsetWidth !== 0; + return $('body').is(':visible'); }