2016-08-11 04:21:28 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
var win = $(window);
|
|
|
|
win.scroll(function() {
|
|
|
|
if ($(document).height() - win.height() == win.scrollTop()) {
|
|
|
|
var formData = $('#pagination form:last').serialize();
|
|
|
|
if (formData) {
|
|
|
|
$('#pagination').html('<div class="loading-spinner"></div>');
|
2016-12-04 11:17:17 +01:00
|
|
|
$.post('./', formData, function (data) {
|
2016-08-11 04:21:28 +02:00
|
|
|
var body = $(data);
|
|
|
|
$('#pagination').remove();
|
|
|
|
$('#main_results').append('<hr/>');
|
|
|
|
$('#main_results').append(body.find('.result'));
|
|
|
|
$('#main_results').append(body.find('#pagination'));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|