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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:27:18+00:00 2026-06-01T17:27:18+00:00

i have a complicated PHP conundrum. I have a constantly updating table in my

  • 0

i have a complicated PHP conundrum. I have a constantly updating table in my database (Lets call it TABLE) with multiple records being added a second, these results will be posted using PHP on a page (page.php) using AJAX.

The maximum amount of posts shown are 1 every three seconds, for which i have a relevancy algorithm. I don’t know how to merge the jquery transitions with the constantly updated records from the table (Got by AJAX).The best i came up with isn’t much better than a hack, and dosen’t accomadate for an infinite number of posts.

Jquery:

$(#5).delay(1000).slideDown(700);
$(#4).delay(4000).slideDown(700);
$(#3).delay(8000).slideDown(700);
$(#2).delay(12000).slideDown(700);
$(#1).delay(16000).slideDown(700);

PHP:
Not required

HTML:

<div id='5' class='post'></div>
<div id='4' class='post'></div>
<div id='3' class='post'></div>
<div id='2' class='post'></div>
<div id='1' class='post'></div>

I don’t know what to do with AJAX.

Any help would be greatly appreciated,

thanks

  • 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-01T17:27:19+00:00Added an answer on June 1, 2026 at 5:27 pm

    If your question is simply how to slidedown the newest appended div, try this:

    HTML:

    <div id="updatePanel">
        <div id='div5' class='post'></div>
        <div id='div4' class='post'></div>
        <div id='div3' class='post'></div>
        <div id='div2' class='post'></div>
        <div id='div1' class='post'></div>
    </div>
    

    Note: id attributes starting with numbers are invalid.

    jQuery

    setInterval(getData, 3000);
    
    function getData() {
        // call ajax, get data.
        // success: function () {...
        var id = parseInt($("#updatePanel div:first").attr("id").replace("div", "")) + 1;
    
        $div = $("<div></div>").attr("id", id)
            .addClass("post")
            .text(dataFromAJAX)
            .css("display", "none") // change this to be a class - this is just to make it clear.
            .prependTo("#updatePanel")
            .slideDown();
    }
    

    Example fiddle

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

Sidebar

Related Questions

I have a fairly complicated html table containing lots of PHP, CSS etc., and
I have a huge table full of records and with PHP I'm making a
I have a complicated page being rendered by PHP and would like to keep
I have a pretty complicated index.php now, and I would like to only run
OK, so I have a large and complicated upcoming events PHP module that I
This is a bit complicated so bear with me: On FORM.php, I have 2
first Request: http://url.tld/calc-sth-complicated second Request: http://url.tld/simple-view I have a Webapplication - Windows/Apache/PHP/MySQL. If I
I have some (php) code that performs critical updates on an InnoDB table. I'm
I have a PHP script that I am using to generate some rather complicated
I have a rather complicated issue that I am trying to solve in PHP

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.