From 918590d3bc52114bef6242af2b002b5181158785 Mon Sep 17 00:00:00 2001 From: Girvan Liu Date: Wed, 8 Aug 2012 15:00:26 +0800 Subject: [PATCH] window's height in ios is dynamic, window's height will increase after user scroll down, but .height() will get old value --- jquery.lazyload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.lazyload.js b/jquery.lazyload.js index 4657fb08..98943412 100644 --- a/jquery.lazyload.js +++ b/jquery.lazyload.js @@ -143,7 +143,7 @@ var fold; if (settings.container === undefined || settings.container === window) { - fold = $window.height() + $window.scrollTop(); + fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); } else { fold = $(settings.container).offset().top + $(settings.container).height(); } @@ -207,4 +207,4 @@ "left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); } }); -})(jQuery, window); \ No newline at end of file +})(jQuery, window);