2016-08-11 04:21:28 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
var win = $(window);
|
|
|
|
win.scroll(function() {
|
2019-06-04 18:22:02 +02:00
|
|
|
if ($(document).height() - win.height() - win.scrollTop() < 150) {
|
2016-08-11 04:21:28 +02:00
|
|
|
var formData = $('#pagination form:last').serialize();
|
|
|
|
if (formData) {
|
|
|
|
$('#pagination').html('<div class="loading-spinner"></div>');
|
2019-12-11 14:34:25 +01:00
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: './',
|
|
|
|
data: formData,
|
|
|
|
dataType: 'html',
|
|
|
|
success: function(data) {
|
|
|
|
var body = $(data);
|
|
|
|
$('#pagination').remove();
|
|
|
|
$('#main_results').append('<hr/>');
|
|
|
|
$('#main_results').append(body.find('.result'));
|
|
|
|
$('#main_results').append(body.find('#pagination'));
|
|
|
|
}
|
2016-08-11 04:21:28 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|