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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:12:52+00:00 2026-05-13T19:12:52+00:00

If I have <div id=curve style=position:relative; height:100px; width:100px; /> How would I make it

  • 0

If I have
<div id="curve" style="position:relative; height:100px; width:100px; />

How would I make it move on a curve? I’ve googled and everything but can’t seem to find another example that would call two functions at once. This is the kind of code I would like, but doesn’t work:

$('#curve').click(function () {
    $(this).animate(
        { 
            top: 400,
            left = $(this).left() + $(this).left()*$(this).left()
        },
        'slow',
        function() { $(this).animate( { left: 600 }, 'fast' ); }
    );
});

Even if that’s not correct code, I believe animate only takes “destinations” for something to go to, so a dynamic destination wouldn’t work I think. What am I looking for to make this work?

EDIT:: I’ll definitely pick up that plugin, but I’m also wonder why this bit of code doesn’t work as I’d expect it to.

Here’s another attempt using a for loop and the delay method

$('#curve').click(function () {
    for (var i=0; i<400; i++ )
    {
        $(this).delay(1000);
        $(this).css( { top: i, left: i*1.5 } );
    }
});

Except it just instantly goes to that position, no delay or anything. so if it was starting at [0,0], as soon as I click it it teleports to [400,600]. Why doesn’t the delay work?

  • 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-13T19:12:52+00:00Added an answer on May 13, 2026 at 7:12 pm

    I think that this time, you have to recalculate animated curve part by part in js and then do it by moving by little parts (= you probably could find plugin OR you’ll have to do all the math by yourself)

    Edit 2: Previously added link was moved=> http://foxparker.wordpress.com/2009/09/22/bezier-curves-and-arcs-in-jquery/. Thanks, Zach.

    Edit 1: this intrigued me, so I did little google research – just as I thought: plugin ready for use here: http://foxparker.wordpress.com/2009/09/22/bezier-curves-and-arcs-in-jquery/

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

Sidebar

Related Questions

So currently I have: #div { position: relative; height: 510px; overflow-y: scroll; } However
It seems that in Firefox, if I have div A with fixed width/height and
I have Div Container with css class: .content4 { height: 1400px; width: 920px; border:
I have div with the following css style: width:335px; float:left; overflow:hidden; padding-left:5px; When I
I have div ( #child ) which won't expand to the full height of
I have a div that expands to the height of it's content. It works
I have div with a few links spread out in the content. I would
I have div and function mouseover: $('#mydiv').mouseover(function(){ $('#otherdiv').show('slow'); }); $('#otherdiv').mouseout(function(){ $('#otherdiv').hide('slow'); }); but... The
I have div, which has id 'content'. It's visible. <div id=wrapper style=display:block> <div id=content>
I have a div which needs to fill out the height of the browser's

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.