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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:55:21+00:00 2026-06-01T22:55:21+00:00

got a problem i need to do something like a fading banner – one

  • 0

got a problem i need to do something like a fading banner – one div fading out then second div fading in, here’s the code:

$(document).ready(function() {
    setTimeout(function() {
        $('#zeus').fadeOut(1000);
     }, 5000);
    $('#zeuss').hide();
    setTimeout(function(){
        $('#zeuss').fadeIn(1000);
    }, 6000);
});

it works, but after #zeuss fades in then it just stays here. I need to do that repeatedly. And please don’t offer to use .delay() because im on jquery 1.3.2

EDIT.
by default #zeus is shown on the page, i want to fade it out then fade in #zeuss, then again fade in #zeus and then fade out #zeus and fade in #zeuss etc..

  • 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-01T22:55:23+00:00Added an answer on June 1, 2026 at 10:55 pm

    As is often the case, a general and extensible solution is simpler:

    UPDATE: Took jfriend00’s suggestion and moved from multiple timers to completion function to preclude accumulation errors over time.

    /**
     * Fade-cycles elements with class 'banner'
     */
    $(document).ready(function() {
    
        var delay = 3000, fade = 1000; // tweak-able
        var banners = $('.banner');
        var len = banners.length;
        var i = 0;
    
        setTimeout(cycle, delay); // <-- start
    
        function cycle() {
            $(banners[i%len]).fadeOut(fade, function() {
                $(banners[++i%len]).fadeIn(fade, function() { // mod ftw
                    setTimeout(cycle, delay);
                });
            });
        }
    
    });
    
    • DEMO using jQuery 1.3.2
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've got the following Problem / Question: I have HTML Code like this: <div
i got problem with my code and hopefully someone able to figure it out.
I've got a problem.. I've got something like... if(condition(TEST) == true){ something (NAME) =
I'm with a problem in PostgreSQL. I need to do something like this: select
i got some problem and need help .. my plan : 1. get ip
Ive got this problem: Line 20 (LOOT_FromContainer(container) I need that to use as Invoke
I've got a problem about onbeforeunload recently that I need to pop up a
I got a problem today. It had a method and I need to find
Got a strange problem created a little stored proc which need to execute a
Got a requirement to rebuild mssql full-text index. Problem is - I need to

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.