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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:28:05+00:00 2026-06-10T05:28:05+00:00

I have defined a function to animate 7 divs to the top. I tried

  • 0

I have defined a function to animate 7 divs to the top. I tried to using stop(true, false) function to stop all the element. and restart the animation by calling the function again. please see the code below. the problem is the animation became very slow after I call the function to restart the animation. it slows for a few seconds and become normal speed again. does anyone know the reason. please help!!! Thanks

my code is attach below

autoAnimate(5000);
$('#scroller_container').mouseenter(function(){
    $('#scroller .galleryThumb').stop(true, false);
});
$('#scroller_container').mouseleave(function(){
    autoAnimate(5000);
});

function autoAnimate(speed) {
    $('#scroller .galleryThumb:eq(0)')
        .animate({'top':'-122px'},speed,'linear',function(){
          if(!autoFlag) {
            index       = $('#scroller .galleryThumb:last').attr('id');
            index       = index.substr(5, index.length);
            index       = parseInt(index);
            index       = index + 1;
            autoFlag    = true;
          }
          if(index == numberOfAds) { index = 0; }

          $('#scroller .galleryThumb:eq(0)').remove();
          $('#scroller').append(adUnitContainer[index]);
          $('#scroller .galleryThumb:eq(6)').css('top','732px');
          index++;
          autoAnimate(speed);
    });
    $('#scroller .galleryThumb:eq(1)').animate({'top':'0px'},speed,'linear');
    $('#scroller .galleryThumb:eq(2)').animate({'top':'122px'},speed,'linear');
    $('#scroller .galleryThumb:eq(3)').animate({'top':'244px'},speed,'linear');
    $('#scroller .galleryThumb:eq(4)').animate({'top':'366px'},speed,'linear');
    $('#scroller .galleryThumb:eq(5)').animate({'top':'488px'},speed,'linear');
    $('#scroller .galleryThumb:eq(6)').animate({'top':'610px'},speed,'linear');
}
  • 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-10T05:28:07+00:00Added an answer on June 10, 2026 at 5:28 am

    If you have a 5 second animation and you stop it in the middle and then you restart the same animation with the same final point for the animation and you tell it to run for 5 seconds, it will go slower because it has less distance to go in the 5 seconds.

    If you want it to restart with the same speed it had before, then you have to reduce the amount of time in the second animation to reflect a pro-rated amount of time.

    Remember speed = distance / time. If your restarted animation has a shorter distance to travel but the same time, it’s going be a slower speed unless you also reduce the time proportionally.

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

Sidebar

Related Questions

I have javascript object defined like this: function SocialMiner() { var verbose=true; var profileArray=new
Lets assume I have defined function: def threeArgs(x,y,z): return ... # Returns True or
I have defined a function in vim to properly indent folds. Ie so they
I have defined a function in which i want to open a page on
I have defined a function in my Navigation model that executes a query, and
Friends, I have two files, a.c and b.c . I have defined a function
I have this self-defined function in my .bashrc : function ord() { printf '%d'
I have this user defined function. public partial class UserDefinedFunctions { static int i;
I have a User Defined Function (UDF) written in Java to parse lines in
in header file I have defined the following function #ifndef OS_H #define OS_H #include

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.