From 9adcfa99f429245ea9d88751c8b2370622e8ca08 Mon Sep 17 00:00:00 2001 From: Ghighi Eftimie Date: Sun, 11 Oct 2020 22:35:56 +0300 Subject: [PATCH] trigger infinite scroll script only on templates where .load-more class is present --- cps/static/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 44a72b06..c1f58b7f 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -172,7 +172,7 @@ $(function() { layoutMode : "fitColumns" }); - if ($('.next').length) { + if ($(".load-more").length && $(".next").length) { var $loadMore = $(".load-more .row").infiniteScroll({ debug: false, // selector for the paged navigation (it will be hidden)