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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:08:47+00:00 2026-05-15T20:08:47+00:00

I know there are a lot of good JS packages that exist that include

  • 0

I know there are a lot of good JS packages that exist that include animation libraries, but there is a simple animation that I am writing that slides a DIV around a page. Needing all of Jquery for this seems like overkill. The animation is workig great, and now I just want to tune it so that it moves as smooth as possible.

Say I want the DIV to move X pixels in N seconds. I can adjust the sleep time between the animation loop and the distance the DIV moves within each loop. What are some good rules of thumb to tune the animation so it looks smooth on most browsers/computers? Are there any good ways to profile the current user and tune the animation parameters on the fly?

Thanks!

  • 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-15T20:08:47+00:00Added an answer on May 15, 2026 at 8:08 pm

    If you know the speed (in pixels per millisecond) that you want the animation to use, you can save the current time (new Date()) in each animation tick, then check how much time has passed since the previous tick and multiply that by the speed to get the number of pixels to move.

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

Sidebar

Related Questions

I know there is a lot of resources about that here but yet, I
I know there a lot of similar questions to this, but I didn't find
I know there are a lot of positive things mod-rewrite accomplishes. But are there
I know there is a lot of controversy (maybe not controversy, but arguments at
I know there's a lot of resource for this via google, but I just
I know there's a lot of questions about this but I've been struggling with
I know there's a lot of posts with the same that problem. I just
I know that there has to be quite a lot of documentation about this
I know there's a lot of good questions on the site about these two
I know there is a lot of good questions answered on Left Joins ,

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.