From 3c3f58040dcc2992d566bc4cb871838a28eb88b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Garrido=20Labrador?= Date: Mon, 22 Oct 2018 11:52:22 +0200 Subject: [PATCH] HotFix: mobile scroll down --- Source/assets/js/functions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/assets/js/functions.js b/Source/assets/js/functions.js index becc9a6..6f43575 100644 --- a/Source/assets/js/functions.js +++ b/Source/assets/js/functions.js @@ -142,11 +142,14 @@ function resetFilter(){ o=1; -$(window).scroll(function () { - if (Math.ceil($(window).scrollTop() + $(window).height())== Math.ceil($(document).height())) { +$(document.body).on('touchmove', onScroll()); +$(windows).on('scroll', onScroll()); + +function onScroll() { + if (Math.ceil($(window).scrollTop() + $(window).height()) == Math.ceil($(document).height())) { getAjax(); } - }); +} //From https://stackoverflow.com/questions/35297919/javascript-select-all-text-inside-a-pre-code-block-on-double-click window.onload = function(){