Merge pull request #1614 from Nachtalb/ne/improve-infinite-scroll

Improve infinite scroll (and with it fixing a bug)
This commit is contained in:
Noémi Ványi 2019-06-30 13:49:16 +02:00 committed by GitHub
commit 69c8ad86f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
$(document).ready(function() {
var win = $(window);
win.scroll(function() {
if ($(document).height() - win.height() == win.scrollTop()) {
if ($(document).height() - win.height() - win.scrollTop() < 150) {
var formData = $('#pagination form:last').serialize();
if (formData) {
$('#pagination').html('<div class="loading-spinner"></div>');