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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:49:46+00:00 2026-06-11T00:49:46+00:00

Im trying to animate one elment after another, but I have some troubles with

  • 0

Im trying to animate one elment after another, but I have some troubles with this

    $.getJSON('http://localhost/json/example/json.json', function(data){
        var ele = jsonElements(data);
        for(var i = 1; i <= ele; i++)
        {
            $('#test').append('<a href="#" id="t_'+i+'" class="block-icon"></a>');
            $('#t_'+i).animate({
                'top': data['t_'+i]['top'],
                'left': data['t_'+i]['left']
                }, 800).delay(1000);
        }

    });

It works, but all elements have animation in same time, any advice how to make it one after another?

  • 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-11T00:49:48+00:00Added an answer on June 11, 2026 at 12:49 am
    $.getJSON('http://localhost/json/example/json.json', function(data){
            var ele = jsonElements(data);
            one_by_one(ele,1);
        });
    
    function one_by_one(ele,i){
    if(i > ele)
    return;
    
    $('#test').append('<a href="#" id="t_'+i+'" class="block-icon"></a>');
    $('#t_'+i).animate({
                    'top': data['t_'+i]['top'],
                    'left': data['t_'+i]['left']
                    }, 1000, function() {
        // Animation complete
        one_by_one(ele,i+1);
      });
    
    }
    

    call one_by_one(i);

    I added an example on http://jsfiddle.net/VS8tQ/64/

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

Sidebar

Related Questions

I'm trying to animate a dot from one point to another on a map.
I'm trying my best to make this make sense, but basically I have a
I'm trying to animate some text 'zooming out' on top of another view. My
I'm trying to animate some elements on my page. One of the properties I
I am trying to animate sliding out one view from a window and simultaneous
I'm trying to animate a logo. The markup looks like this: <div id=logo> <h1>
I am using flot to do some graphing and I am trying to animate
I was trying to animate a sprite only once but it is animated twice
I'm trying to animate object. I use keyframe animation: I have two vertex buffers
I am trying to find a way to animate two views in this way:

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.