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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:31:58+00:00 2026-06-13T08:31:58+00:00

i want to implement this animation below: and i’m create js fiddle to work

  • 0

i want to implement this animation below:

enter image description here

and i’m create js fiddle to work like that, but i have stack when i want to set a position of (x,y) ..

var interval;
function moveit(left,top) {
    $("#obj").css("left",left+'px');
    $("#obj").css("top",top+'px');
}
$("#change").click(function(){
    var left = $("#left").val(); //posisi x
    var top = $("#top").val();  //posisi y
    var velocity= 1;

    interval = setInterval(function() {
        left = parseFloat(left) + parseFloat(velocity);
        top = parseFloat(top) + parseFloat(velocity);
        console.log('position x = ' + left);
        console.log('position y = ' + top);

        if(top >= 400 ) {
        clearInterval(interval);
        }

        moveit(left,top);
    },10);
});

$("#clear").click(function(){
clearInterval(interval);
});
​

this is my js fiddle http://jsfiddle.net/viyancs/MxuRP/1/

my question

  1. how to getting x,y coordinate of that curve by generating code ?
  2. maybe you have another idea for make this better?

thanks you

  • 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-13T08:31:59+00:00Added an answer on June 13, 2026 at 8:31 am

    Change the y-component of the velocity through time.

    http://jsfiddle.net/MxuRP/2/

    var interval;
    function moveit(left,top) {
        $("#obj").css("left",left+'px');
        $("#obj").css("top",top+'px');
    }
    $("#change").click(function(){
        var left = $("#left").val(); //posisi x
        var top = $("#top").val();  //posisi y
        var velocityX = 1;
        var velocityY = 0;
        var accelerationY = 0.1;
    
        interval = setInterval(function() {
            left = parseFloat(left) + parseFloat(velocityX);
            velocityY += accelerationY;
            top = parseFloat(top) + parseFloat(velocityY);
            console.log('position x = ' + left);
            console.log('position y = ' + top);
    
            if(top >= 400 ) {
            clearInterval(interval);
            }
    
            moveit(left,top);
        },10);
    });
    
    $("#clear").click(function(){
    clearInterval(interval);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement this view But I have one question: The text which
I have this algorithm that I want to implement on VB6. Sub Main() dim
i starter in jqgrid, i want implement inline edit in jqgrid i have this
i have a layout that looks like this: (without the arrows) the pictures of
I want to implement some animation in CSS3 which has an effect like its
I want to implement a simple animation based on UIView's center property. I have
I have an idea of how I want to approach this but i'm not
I want to implement a walking animation into my game that I am making,
I want to implement an animation which is like the sync animation of evernote
I want to implement this JSF page with pagination and sorting. Unfortunately Netbeans shows

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.