Просмотр исходного кода

use jQuery to detect if body/calendar-element is visible and ready for rendering

Adam Shaw 12 лет назад
Родитель
Сommit
fec455dbfc
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/Calendar.js

+ 2 - 2
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');
 	}