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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:36:26+00:00 2026-05-31T13:36:26+00:00

Is there a way to do the following in jQuery: Animate DIV to left:

  • 0

Is there a way to do the following in jQuery:

  1. Animate DIV to left: -200px; top: -200px
  2. Animate DIV to left: 0px; top: -400px
  3. Animate DIV to left: -200px; top: -600px
  4. Go to 1, repeat till some user event interrupts
  • 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-31T13:36:26+00:00Added an answer on May 31, 2026 at 1:36 pm

    I didn’t quite follow what exact dimensions you wanted, but you can fill in the values you want. Here’s the general idea. jQuery animations go in a queue and are naturally chained one after the other so you can just fire them all off and it will queue them up and then use the completion function on the last one to start it over again like this:

    function go() {
        $("#box")
            .animate({left: "100px", top: "0"}, 1000)
            .animate({left: "400px", top: "0"}, 1000)
            .animate({left: "400px", top: "400px"}, 2000)
            .animate({left: "100px", top: "400px"}, 2000, go);
    
    }
    
    go();
    
    $("#stop").click(function() {
        $("#box").stop(true);
    });
    
    $("#start").click(go);
    

    You can stop the animation at any time by calling the jQuery .stop(true) method on the animating object. Here’s a working demo: http://jsfiddle.net/jfriend00/PnzQ9/

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

Sidebar

Related Questions

I have the following jquery and it is getting long. Is there any way
Is there a way to get jQuery to work in the following way? I
I am wondering is there any way to execute following shell script, which waits
Is there a way to do the following? I see that the Attribute Arguments
Is there a way to get the following function declaration? public bool Foo<T>() where
Is there any way to do the following: validateLogin(); return false; But actually like
Is there any way I could run the following 'logical code' to actually work?
Is there a way to format a decimal as following: 100 -> 100 100.1
is there a way to do the following in one Django query? MyModel.filter(attr=a).values('attr','fields','of','interest').annotate(count=Count('id')) MyModel.filter(attr=b).values('attr','fields','of','interest').annotate(count=Count('id'))
Is there a better way than the following brute foce implementation of a c#

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.