Infinite continuous looping scroll on mobile

I have a small problem with my looping scroll. It works pretty well on larger displays, but on handheld devices it glitches quite a lot. I’m not sure where I’m doing something wrong or where I should adjust the code to work on mobile as well.

Link to site:

Here’s what I got so far:

var origDivHeight = document.querySelector(".infinite").offsetHeight;

var clone=$(".infinite").contents().clone();


    var scrollWindowPos = $(document).scrollTop(); 

    if(scrollWindowPos >= origDivHeight ) { 
    if(scrollWindowPos <= 0 ) { 


window.scrollBy(0, 1);
window.scrollBy(0, -1);

71 thoughts on “Infinite continuous looping scroll on mobile”

  1. What i don’t understood is in fact how you are now not really much more neatly-favored than you may be
    now. You are very intelligent. You recognize therefore significantly relating to this topic,
    produced me individually imagine it from numerous
    numerous angles. Its like women and men are not interested except it is something to do with Woman gaga!
    Your personal stuffs nice. At all times deal with
    it up!


Leave a Comment