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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:53:11+00:00 2026-05-28T04:53:11+00:00

I am trying to configure returned data from $.ajax() by jQuery… My example is

  • 0

I am trying to configure returned data from $.ajax() by jQuery…

My example is like that:

First of all I’m using codeigniter framework (just for attention)

Now by ajax I am calling function which returned group of divs

exp:

function my_function() {
    for($i = 0; $i < 3; $i++) {
        print '<div class="block">'.$i.'</div>';
    }
} 

Now by js code:

$.ajax({
    type: "POST",
    url: "path/to/my_function",

    success: function(data){
        $('#div#container').html(data);
    }
});

Now all div (3 divs with block class) are appear at one time.(And I don’t like that)

I want each one of the last three div appear sequentially (with slideDown for example)
Now my specifically question is:
How I configure data returned by ajax by loop for example????? to use slideDown for each div??

  • 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-28T04:53:11+00:00Added an answer on May 28, 2026 at 4:53 am

    You fire the slide down function for each div once the other has completed if you want one div to display after the other. You could build a recursive function so you can dynamically set indexes to start and end at certain values. Of course, your div ids will have to be named properly so you can do something like this.

    function doSlideDown(startIndex, endIndex){
        $('div#container'+startIndex).slideDown(500, function(){
            if(startIndex < endIndex){
                doSlideDown(startIndex+1, endIndex);
            }
        });
    }
    
    $.ajax({
    type: "POST",
    url: "path/to/my_function",
    
    success: function(data){
        $('div#container1').html(data);
        $('div#container2').html(data);
        $('div#container3').html(data);
    
        doSlideDown(1,3);
    }
    });
    

    This will make sure that only one div slides out at a time.

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

Sidebar

Related Questions

I'm trying to configure a dedicated server that runs ASP.NET to send mail through
I am trying to configure a network connection using ConfigurationManager.ProcessConfiguration, with the configuration file
I am trying to implement Ext.ux.grid.filter.ListFilter using a data store (rather than a hardcoded
I've been trying to configure two separate Django apps on one server such that
Trying to configure Jenkins CI. Currently just running it from the .war (eventual intention
I'm trying configure memcache using Magento. Looking around in the code, I see some
I am trying configure visibility of a command within the context menu using 'visibleWhen'
I want to be able to Ajax-ly retrieve JSON data from some kind of
I have two separate web services, the first configured to extract data from a
I'm trying to configure the Quick Launch menu to only display the ancestors and

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.