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

  • Home
  • SEARCH
  • 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 8704677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:10:06+00:00 2026-06-13T03:10:06+00:00

I am trying to create a carousel in jQuery that is constantly scrolling much

  • 0

I am trying to create a carousel in jQuery that is constantly scrolling much like a stock ticker (ie: there should never be a pause in the scrolling animation.)

See a jsFiddle example of what I have attempted so far here: http://jsfiddle.net/c5VQe/

Using the following code, I’ve created a carousel in 3 lines of code that does exactly what I want except that there is a slight delay after the carousel rotates one time.

function RotateCarousel() {  
    $("ul li:first-child").animate({ marginLeft: -200  }, 1500, function () {
        $("ul li:first-child").appendTo('ul');
        $("ul li:last-child").css('margin-Left', 0);
        RotateCarousel();
    });
}

How can I get rid of this delay?

Note: I’m not interested in using any plugins. It should be possible to eliminate the delay without resorting to a lot of unnecessary code.

  • 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-13T03:10:07+00:00Added an answer on June 13, 2026 at 3:10 am

    Just set the easing option to linear:

    $("ul li:first-child").animate({ marginLeft: -200 }, 1500, 'linear', function () {
    //                                                         ^-- here
    

    Fiddle

    As you haven’t set one before, jQuery defaults it to swing.

    From the .animate() docs:

    Easing

    The remaining parameter of .animate() is a string naming an easing
    function to use. An easing function specifies the speed at which the
    animation progresses at different points within the animation. The
    only easing implementations in the jQuery library are the default,
    called swing, and one that progresses at a constant pace, called
    linear.


    Side-note: Your setTimeout()‘s syntax was wrong, it should be

    setTimeout(RotateCarousel, 1500); //passing a function object reference
    

    To delay the init of the carousel.

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

Sidebar

Related Questions

I trying to create an animation with JQuery that scrolls 1 word in a
I'm trying to create a carousel similar to http://www.aprica.jp/ , using jQuery and HTML.
I'm trying to create my own jquery image carousel in order to make myself
I'm trying to create a carousel effect that automatically cycles through each pictures every
I'm trying to create a 3D Carousel using CSS3 ( transform ). But, there
I am trying to create a carousel that contains 7 days with items under
I recently tried to create an object like this: var carousel = { $slider:
I'm trying to create a gallery/carousel widget which will display a div over each
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I am trying create a small web application that allows a user to login

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.