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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:29:29+00:00 2026-05-15T18:29:29+00:00

I got a vertical testimonials belt and i have this method that animates its

  • 0

I got a vertical testimonials belt and i have this method that animates its top value with a calculated value (depending on the height of the current testimonial) every few seconds.

Now when a user hovers over it, it stops right away (via .stop() and also the interval is cleared via clearInterval(idOfinterval)
But i still want to know how much more pixels it had left to animate before it suddenly got halted.

So i looked up in the documentation and i see that there is a step method that has a callback and can give me information on each(?) step of the animation.

see part of the code

 //in middle of a object literal
  animate:function(){
    animAmmount = someCalculation;
    testimonialsBelt.parentElment.animate({
    top:"-="+howMuchIsLeft||animAmmount+"px"},
    {step:function(step){
         //here i am trying to get how much px it has moved so far
           currTopVal = step;
           console.log("currTopVal", currTopVal);
        // i get some numbers, and i have no idea from where it got them 
       }
   },
   calculatedSpeed);
}

So my main questions are

  • What information can i get from parameters passed in to the step method?
  • and does it callback on each interval of an animation?
    • 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-15T18:29:30+00:00Added an answer on May 15, 2026 at 6:29 pm

      It looks like the “this” symbol will be the element animate was called on. The first parameter to the callback looks like the value of the property animated on this step. The second parameter is an object that looks like this:

      • elem: the element animate was called on
      • end: (guess) the value of the property when animation is complete
      • now: (guess) the value of the property in this step
      • options: the original options you passed into animate.
      • pos: (guess) the position of something
      • prop: (guess) the property acted on in this step. If there are multiple property changes, there is probably a step for each one.
      • start: (guess) the value of the property when animation was started
      • startTime: (guess) the time in ms the animation started.
      • state: A float from 0 to 1 that indicates how close to completion the animation is.
      • unit: the unit of the property value (e.g. ‘px’).
      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

    Sidebar

    Related Questions

    Got a class that serializes into xml with XMLEncoder nicely with all the variables
    Got a bit of a mind freeze at the moment. I have the following
    I got this error today when trying to open a Visual Studio 2008 project
    I got this output when running sudo cpan Scalar::Util::Numeric jmm@freekbox:~/bfwsandbox/sa/angel/astroportal/dtu8e/resources$ sudo cpan Scalar::Util::Numeric [sudo]
    Say I've got some TextBlocks on my UI, something like so: <StackPanel Orientation=Vertical> <TextBlock
    UPDATE : Got a reply from Google that it isn't possible: http://code.google.com/p/android/issues/detail?id=11752&can=1&q=videoview&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars This should
    I've got a ListActivity that displays WebView s. There is a menu option to
    I want to remove the Vertical slider from QWebView that displays GoogleMap with current
    I've got some code that takes repeated local neighbourhoods from a large array. I
    I've got an ImageView that I've wrapped in a LinearLayout. The LinearLayout has a

    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.