Исправлена автозагрузка постов в блоге

parent bbe51d61
...@@ -109,7 +109,7 @@ function initScrollPager() { ...@@ -109,7 +109,7 @@ function initScrollPager() {
var maxPosition = $(window).scrollTop(); var maxPosition = $(window).scrollTop();
$(window).scroll(function() { $(window).scroll(function() {
var position = $(window).scrollTop() + $(window).height(); var position = $(window).scrollTop() + $(window).height();
if(position >= maxPosition && position >= $(document).height() - 500 && !loadProcess && !allPostsLoaded) { if(position >= maxPosition && position >= $(document).height() - 300 && !loadProcess && !allPostsLoaded) {
maxPosition = position; maxPosition = position;
loadPosts(); loadPosts();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment