|
|
@ -1,7 +1,9 @@
|
|
|
|
$(document).ready(function() {
|
|
|
|
function hasScrollbar() {
|
|
|
|
var win = $(window);
|
|
|
|
var root = document.compatMode=='BackCompat'? document.body : document.documentElement;
|
|
|
|
win.scroll(function() {
|
|
|
|
return root.scrollHeight>root.clientHeight;
|
|
|
|
if ($(document).height() - win.height() - win.scrollTop() < 150) {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function loadNextPage() {
|
|
|
|
var formData = $('#pagination form:last').serialize();
|
|
|
|
var formData = $('#pagination form:last').serialize();
|
|
|
|
if (formData) {
|
|
|
|
if (formData) {
|
|
|
|
$('#pagination').html('<div class="loading-spinner"></div>');
|
|
|
|
$('#pagination').html('<div class="loading-spinner"></div>');
|
|
|
@ -16,9 +18,23 @@ $(document).ready(function() {
|
|
|
|
$('#main_results').append('<hr/>');
|
|
|
|
$('#main_results').append('<hr/>');
|
|
|
|
$('#main_results').append(body.find('.result'));
|
|
|
|
$('#main_results').append(body.find('.result'));
|
|
|
|
$('#main_results').append(body.find('#pagination'));
|
|
|
|
$('#main_results').append(body.find('#pagination'));
|
|
|
|
|
|
|
|
if(!hasScrollbar()) {
|
|
|
|
|
|
|
|
loadNextPage();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
var win = $(window);
|
|
|
|
|
|
|
|
if(!hasScrollbar()) {
|
|
|
|
|
|
|
|
loadNextPage();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
win.scroll(function() {
|
|
|
|
|
|
|
|
$("#pagination button").css("visibility", "hidden");
|
|
|
|
|
|
|
|
if ($(document).height() - win.height() - win.scrollTop() < 150) {
|
|
|
|
|
|
|
|
loadNextPage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|