Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9224235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:16:09+00:00 2026-06-18T04:16:09+00:00

I have been working on two column website, whereby when you scroll: column A

  • 0

I have been working on two column website, whereby when you scroll: column A goes up and column B goes down. I implemented an infinite scroll but what I am wondering is: is it possible to clone/append one column onto the other e.g. at a certain length of scrolling:

Once scrolled out of view:

  • Column A boxes will move onto the end of column B
  • Column B boxes will move onto the end of column A

Technically still infinite but looping the boxes from column to column – spilling one into the other and back again.

Is this approach bad, or, is it better to just use endless scroll on each column? What is tripping me up, as I am new to JS and jQuery, is the logic, and what is the best approach to achieve this.

movement of columns example

*Image just for example, the amount of boxes could be a lot higher e.g. 10 in each column.

My code so far: http://jsfiddle.net/djsbaker/vqUq7/1/

My current attempt at clone/append:

var ele = document.getElementById("box");
var arr = jQuery.makeArray(ele);
var data = (ele)[0];

$(window).scroll(function() {  
  if ( $(window).scrollTop() >= 1000) {
    $(data).clone().appendTo('body');
  } else {
    ..
  }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:16:11+00:00Added an answer on June 18, 2026 at 4:16 am

    Infinite scrolling. Done : the Fiddle http://jsfiddle.net/PgMUP/14/

    You had set everything up.

    The code (neatened up a little) :

    var num_children = $('#up-left').children().length;
    var child_height = $('#up-left').height() / num_children;
    var half_way = num_children * child_height / 2;
    $(window).scrollTop(half_way);
    var ul = '#up-left'; 
    var dr = '#down-right'; 
    function crisscross() {
        $(ul).css('bottom', '-' + window.scrollY + 'px');
        $(dr).css('bottom', '-' + window.scrollY + 'px');
        var ulc = $(ul).children();
        var drc = $(dr).children();
        var corners = [ulc.first(),ulc.last(),drc.last(),drc.first()];
        if (window.scrollY > half_way ) {
            $(window).scrollTop(half_way - child_height);
            corners[2].appendTo(ul);    
            corners[0].prependTo(dr);
        } else if (window.scrollY < half_way - child_height) {
            $(window).scrollTop(half_way);
            corners[1].appendTo(dr);
            corners[3].prependTo(ul);
        }
    }
    $(window).scroll(crisscross);
    

    It works as your diagram suggests. The flicker is caused because browser reflow is triggered. A better method, instead of detaching and then inserting the divs, I believe would be simply to swap the attributes between two divs. Say whatever you have in there, the images, the text, the colors, the css classes, just swap that across with a big all purpose swap function. Then, since the containers themselves will remain fixed.

    I adding containing divs and swapping the inner div out, so the size structure of the columns was preserved, but this did not work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have now been working as a web developer for two weeks and have
I've been working at this for two days and have not had much luck.
I've been working on an application for a little over two years and have
I have been working on a project on and off, but I haven't touched
I have not been working in SQL too long, but I thought I understood
I have been attempting to split a div into two columns using CSS, but
I've been working on website recently and have come across a major problem :http://jimbob.webatu.com/index.html(you'll
Have been working on this question for a couple hours and have come close
I have been working with SQL Server as a Developer a while. One thing
I have been working on a large java application. It is quite parallel, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.