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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:29:30+00:00 2026-06-14T20:29:30+00:00

How do i run an animation(like changing CSS properties) in native javascript without using

  • 0

How do i run an animation(like changing CSS properties) in native javascript without using jQuery library’s animate method??
I have tried jQuery library animate and the framerate interval changes to make my animation fluid.
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-14T20:29:31+00:00Added an answer on June 14, 2026 at 8:29 pm

    Here is an example:

    http://jsfiddle.net/4M3ts/1/

    function animate(object, property, start_value, end_value, time) {
      var frame_rate = 0.06; // 60 FPS
      var frame = 0;
      var delta = (end_value - start_value) / time / frame_rate;
      var handle = setInterval(function() {
        frame++;
        var value = start_value + delta * frame;
        object.style[property] = value + "px";
        if (value == end_value) {
          clearInterval(handle);
        }
      }, 1 / frame_rate);
    }
    
    animate(document.getElementById("a"), "top", 0, 100, 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a NSTimer to run an animation (for now just call it myMethod
I have a web page with animations ( JQuery Animation ) all over the
I am trying to run an animation over the AR camera view, something like
I have created an animation like [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile: @Actor.plist]; spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@Actor.pvr.ccz];
I would like the run an animation only when a touch is performed, and
I have a list extending Ext.dataview.List. I would like to play an animation in
I am trying to have an animation run only when the mouse is over
I have a really simple custom animation that I am trying to run, and
I'm really struggling with a jQuery animation. Please see jsfiddle where I have posted
I have the following method and would like to know if I were to

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.