|
|
@@ -56,15 +56,11 @@ function change_page() { |
|
|
|
} |
|
|
|
|
|
|
|
function isvisible(obj) { |
|
|
|
console.log(obj); |
|
|
|
var top_of_element = $(obj).offset().top; |
|
|
|
var bottom_of_element = $(obj).offset().top + $(obj).outerHeight(); |
|
|
|
var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight(); |
|
|
|
var top_of_screen = $(window).scrollTop(); |
|
|
|
|
|
|
|
console.log("screen: " + top_of_screen + " " + bottom_of_screen); |
|
|
|
console.log("elem: " + top_of_element + " " + bottom_of_element); |
|
|
|
|
|
|
|
if (bottom_of_screen > top_of_element && top_of_screen < bottom_of_element) { |
|
|
|
return true; |
|
|
|
} |
|
|
@@ -136,6 +132,7 @@ function document_load() { |
|
|
|
|
|
|
|
function page_home_scroll() { |
|
|
|
if (isvisible($(".autodoc_template_home_col").last())) { |
|
|
|
console.log("scroll to page " + conf.home.curpage); |
|
|
|
conf.home.curpage++; |
|
|
|
document_load(); |
|
|
|
} |