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

The Archive Base Latest Questions

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

I am working with a demo code in which div will move to right

  • 0

I am working with a demo code in which div will move to right side for a specific position and after that it will go for bottom
Means as

DIV started moving------------------>     
                                    . Div turn to bottom        
                                    .
                                    .
                                    .
                                    .
                                    .
                                    V
                       Div's place after move and turn

To make this type of animation which code should i read and use. i have come to know two code format.
I am pasting two code for demostation.

How to solve this issue:

    1. $( 'span' ).animate({ 
        // Properties of the elements to animate 
        opacity: 0.25, 
        left: '+=50' 
    }, 
    { 
        // step is a callback for each step of the animation 
        step: function( now, fx ) { 
            // do stuff... 
        } 
    }); 


  2. $.when($('#foo').animate({
            top: 100,
            left: 100
        }, 3000)).pipe(function() {
            return this.animate({
                top: 0,
                left: 0
            }, 3000);
        }).then(function() {
            console.log('done');
        });
  • 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:19:36+00:00Added an answer on June 13, 2026 at 8:19 am

    There’s no need to do any deferring here. We have callbacks that execute after something has completed, so we don’t need to catch the when/then/pipe deferred methods.

    $('span').animate({
        top: 100,
        left: 100
    }, 3000, function(){
        $('span').animate({
            top: 0,
            left: 0
        }, 3000, function(){ 
            console.log('done')
        });
    });
    

    Here’s the jsFiddle

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

Sidebar

Related Questions

I'm working on a demo about collision detection. (Some of the code for this
I am using Slidesjs it working fine in below url http://www.mysoko.in/demo/Simple/ And same code
Take the following demo code (from the GIO answer to this question), which uses
I have come across an interesting code example that allows me to make DIV
I'm working on legacy code that looks very similar to this: public class BaseParser
I'm working on a simple demo for collision detection, which contains only a bunch
Ok I am working on a website which is below: http://clinicasdefertilidadenlima.pe/demo/ If you open
I'm working through the Demo: Binding Data with the SqlDataSource of this pluralsight video
I was working on a demo method and found something strange(at least to me
I'm working with a demo of two sortable jquery lists... but have a problem

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.