From a616c1080632ed86d3b90bfb73df1098bfc42023 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Sat, 10 Oct 2015 16:23:11 -0400 Subject: [PATCH] fix continuous scroll #5 --- src/DotNetMashup.Web/Views/Home/Index.cshtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DotNetMashup.Web/Views/Home/Index.cshtml b/src/DotNetMashup.Web/Views/Home/Index.cshtml index 842aa0a..91c0745 100644 --- a/src/DotNetMashup.Web/Views/Home/Index.cshtml +++ b/src/DotNetMashup.Web/Views/Home/Index.cshtml @@ -38,8 +38,7 @@ var loading = false; $(window).on('scroll', function () { var loadingImage = $('.loadWheel'); - var tile = $('.tileRow').last(); - if($(window).scrollTop() + tile.height() + 250 >= tile.position().top && !loading ) { + if($(window).scrollTop() + $(window).height() == $(document).height() && !loading ) { loading = true loadingImage.show(); $.ajax('/Home/Tiles', {data:{page:page+1}})