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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:34:20+00:00 2026-06-14T01:34:20+00:00

My vertical auto scroll seems to stop erratically at some points, I would like

  • 0

My vertical auto scroll seems to stop erratically at some points, I would like to have a smooth scroll instead. Secondly, I would like the vertical scroll to reset automatically (almost loop infinitely or give the implication of it never ending rather than just jumping). How would I go about accomplishing this? Here is my code so far: http://jsfiddle.net/8KjX8/78/.

HTML

<div id="wrapper">
<ul>
    <li><div id='activity_date'>06/11/2012</div></li>
    <li><div id='activity_date'>06/11/2012</div></li>
    <li><div id='activity_date'>06/11/2012</div></li>
    <li><div id='activity_date'>06/11/2012</div></li>
    <li><div id='activity_date'>06/11/2012</div></li>
    <li><div id='activity_date'>06/11/2012</div></li>
</ul>
</div>

CSS

#activity_date {
    background-color: #cc0066;
    color: #FFF;
    width: 80px;
}
#wrapper {
    height: 240px;
    overflow: hidden;
}
#wrapper ul {
    position: relative;
    list-style-type: none;
}
#wrapper li {
    height: 30px;
    line-height: 12px;
    list-style-type: none;
}
​​

JS

(function(){
    var i = 0;

    function Scroll() {
        i++;

        if (i < $('li').length) { // scroll down till we are at the last item
            $('ul').animate({top:'-=30'+'px'}, 1000);
        }
    }

    $(document).ready(function() {
        var timeOut;

        $('ul').hover(
            function(e) { // on hover in, stop the animation
                clearTimeout(timeOut);
            }, 
            function(e) { // on hover out, continue
                timeOut = setInterval(Scroll, 1000);
            }
        );

        timeOut = setInterval(Scroll, 1000); // start the animation at document load

    });

})();
​

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-06-14T01:34:21+00:00Added an answer on June 14, 2026 at 1:34 am

    Animations automatically vary in speed. This is called “easing”, and the two standard options for animate are swing and linear. Swing is the default, and causes the fast-then-slow look. By specifying linear in the animation, you should get rid of this problem:

    $('ul').animate({top:'-=30'+'px'}, 1000, 'linear');
    

    Looping infinitely is much trickier. What you’d have to do is put all your content in a series of absolutely positioned containers, then have each of them animate going upwards, and set up a detection function that tells when a container has completely left the field of vision, and then proceed to set it to the end of the list.

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

Sidebar

Related Questions

I have a big table with vertical scroll bar. I would like to scroll
I have a div with overflow: auto (a vertical scroll bar appears if the
I have an iframe for which I would like to enable a horizontal scroll
I have a (vertical) UISlider inside a UIScrollview. I'd like to be able to
I have lots of radiobutton in a panel with auto scroll set to true
$j('#carousel').jcarousel({ vertical: true, scroll: 1, auto: 2, wrap: 'last', initCallback: mycarousel_initCallback }); $j('div#slideshow-carousel a
Hi I have the container div set for displaying horizontal and vertical scroll bar
I have a long page and it should show the vertical scroll bar in
I have a Scroll viewer <ScrollViewer x:Name=sViewer HorizontalScrollBarVisibility=Disabled VerticalScrollBarVisibility=Auto/> Now after load, how can
In silverlight 2.0. I have some content that i want to scroll vertically 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.