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 6225299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:49:07+00:00 2026-05-24T08:49:07+00:00

I’d like to create an infinite side scrolling div without using extra plugins (besides

  • 0

I’d like to create an infinite side scrolling div without using extra plugins (besides jquery). I found this one: http://www.smoothdivscroll.com/

The problem is not only is it its own plugin, it also utilizes the jqueryUI… adding a bunch of code weight.

Here’s what I have

<div id="columnWrapper">
    <div id="columnSlider">
       <div class="column"></div>
       <div class="column"></div>
       <div class="column"></div>
       <div class="column"></div>
    </div>
</div>

For the javascript, I have a timer set to every 10 milliseconds, manipulating the left margin of the enitre #columnScroll by a few pixels each time.

var sliderInt=self.setInterval(function(){
    $('#columnSlider').css('margin-left',totalMargin);
    totalMargin -= .5;
},10);

What I really need is for the left side of #columnSlider and the right side of the same div to butt ends once the left side is off screen (so that it scrolls sideways infinitely).

Thanks in advance

  • 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-05-24T08:49:08+00:00Added an answer on May 24, 2026 at 8:49 am

    You could try something like this, it’s actually a plugin I wrote to re-use but you can take it out of plugin form like below, you’ll just need to add the correct elements and change element references, I think this is currently a vertical scroll too but – easy to change:

    function initInfiniteScroll(){
    var $carousel, $prevTrigger, $nextTrigger, itemHeight;
        $carousel = $('#alternate-views');
        $prevTrigger = $('.scroll-up');
        $nextTrigger = $('.scroll-down');
        itemHeight = 106;
        $allItems = $carousel.children().clone();
        $allItems.appendTo($carousel);
        $allItems.prependTo($carousel);
    
        $prevTrigger.click(function() {
            scrollCarousel('up');
            return false;
        });
        $nextTrigger.click(function() {
            scrollCarousel();
            return false;
        }); 
    
        function scrollCarousel(direction) {
            if (direction == 'up')
            {
                $carousel.animate({
                    'top': '+=' + itemHeight
                },1000,function(){
                    $carousel.children(':last').clone().prependTo($carousel);
                    $carousel.children(':last').remove(); 
                    $carousel.css({'top':'-' + itemHeight + 'px'});
                });
            }
            else
            {
                $carousel.animate({
                    'top': '-=' + itemHeight
                },1000,function(){
                    $carousel.children(':first').clone().appendTo($carousel);
                    $carousel.children(':first').remove();  
                    $carousel.css({'top':'-' + itemHeight + 'px'});
                });
            }
        }
    }
    

    This does clone the entire load and put it either side of the original scroller too – but you can remove this, also if you’re using jquery 1.4+ you can take out the cloning and instead detach and re-add the items as you scroll.

    Also – if you want to do a setTimeout, just use the content from the click function and put a timer around it. Hope this helps.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have some data like this: 1 2 3 4 5 9 2 6
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm making a simple page using Google Maps API 3. My first. One marker
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.