mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
Merge pull request #1614 from Nachtalb/ne/improve-infinite-scroll
Improve infinite scroll (and with it fixing a bug)
This commit is contained in:
commit
69c8ad86f3
@ -1,7 +1,7 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var win = $(window);
|
var win = $(window);
|
||||||
win.scroll(function() {
|
win.scroll(function() {
|
||||||
if ($(document).height() - win.height() == win.scrollTop()) {
|
if ($(document).height() - win.height() - win.scrollTop() < 150) {
|
||||||
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>');
|
||||||
|
Loading…
Reference in New Issue
Block a user