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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:26:28+00:00 2026-06-08T02:26:28+00:00

I have a problem making a server side generated code( <php ?> ) div

  • 0

I have a problem making a server side generated code(<php ?>) div fade in and out.

I query a database and return six rows that I place in a div.
Normally the div will be duplicated six times because of the while clause in the mysql query.
The problem here is that i want the six divs to fade in and fadeout at different timing.
It does not matter which one fades in first, as long as the six dynamically generated divs fade in randomly at different times.

I know this will be jquery or javascript to which I am a newcomer.

  • 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-08T02:26:31+00:00Added an answer on June 8, 2026 at 2:26 am

    Something like:

    function fadeRandom($divI) { // make a function we can re-use
        window.setTimeout(function() { // do this next stuff after a short break
            $divI.fadeIn(100, function(){ // fade $divI in, then ...
                $divI.fadeOut(100, function() { // fade $divI out, then ...
                    fadeRandom($divI); // start the whole cycle over
                }
            }, Math.random(100) * 100); // do that after 1-100ms
        });
    }
    for (var i = 0; i++; i < 6) { // go through all 6 divs and ...
        fadeRandom($('#div_' + i)); // get the fade cycle started
    }
    

    should work. That’s untested code, and you’ll likely want to tweak the numbers, but hopefully it gives you a basic idea.

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

Sidebar

Related Questions

I have a problem making an advanced (for me) query. I am trying to
I have problem with google map Loading and making center in my java script
I am making a CRUD application in jquery and i have this problem in
I have a problem and can't find a solution. I am making an accordion
i have a problem with updating my textview. i am making a c2dm app.
i'm making window component on Flash Professional CS4 and now i have 1 problem.
Beginner iOS dev here. I have a problem in my array. Im making an
I have a little problem, I'm making project and I'm sending data from client
I have the following problem. I am making this website you can see in
I have segmentation fault problem with my multiple class files project. Without making empty

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.