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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:35:33+00:00 2026-05-25T09:35:33+00:00

I’ve been working on this scripts and can’t seem to get any help. I

  • 0

I’ve been working on this scripts and can’t seem to get any help.

I have it on my fiddle. Basically I have some divs and I wanted them to fade in and fade out which they are doing right now correctly.

However, when content 1 is fading out, content 2 must be coming in at the same time, (I guess the opacity must be lighter) for the smoother transition.

Right now as content 1 fades out, it leaves a white spacing before Content 2 comes in.

JavaScript:

$(function(){
     function fadeMyContent() {

         $(".thecontent:first").fadeIn(700).delay(1000).fadeOut(700,
             function() {    
                     $(this).appendTo($(this).parent());   
                     fadeMyContent();    
             });
      }
     fadeMyContent();
});

HTML:

<ul>
     <li class='thecontent'> CONTENT 1</li>
     <li class='thecontent'> CONTENT 2</li>
     <li class='thecontent'> CONTENT 3</li>
     <li class='thecontent'> CONTENT 4</li>
<ul>

http://jsfiddle.net/myislandshop/wV6Tk/5/

  • 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-25T09:35:33+00:00Added an answer on May 25, 2026 at 9:35 am

    I’ve got you a solution. I’m using images in my JSFiddle, but they’re only to demonstrate the effect. Fading between black backgrounds is difficult; I suggest you give the ul a black background and fade the text/content above it in and out; it will give a nicer effect.

    This is the code from the Fiddle. If you need an explanation, please ask.

    function fadeDivs()
    {
        var currentPanel = $("ul li:visible");
        var currentPanelIndex = currentPanel.index();
    
        currentPanel.fadeOut(1000);
    
        // If the next panel to fade in is beyond the last, start from the beginning again.
        if(currentPanelIndex == ($("ul li").length - 1))
        {
            $("ul li:first-child").fadeIn(1000);
        }
        else    // If it's not the last li, keep going through the list
        {
            currentPanel.next().fadeIn(1000);
        }
    
        // Keep the ball rolling
        setTimeout(fadeDivs, 5000);
    }
    
    $(document).ready(function() {
        // Just to make it look nice - this can be deleted (it's just filler content)
        $("ul li:eq(0)").html("<img src='http://barbados.org/landscap/bcparadise1.jpg'>");
        $("ul li:eq(1)").html("<img src='http://www.get-free-wallpapers.com/wallpaper/previews/3652-1202425455/nature/oceans/3652-victoria-beach-laguna-beach-california.jpg'>");
        $("ul li:eq(2)").html("<img src='http://www.traveltovietnam.cc/Upload/Tour/2352008111155_SplendorOfMuiNeBeachMuiNe2.jpg'>");
        $("ul li:eq(3)").html("<img src='http://www.croatia-danexumag.com/cms_upload/upload/Apartments_VERUDELA_BEACH_00.jpg'>");
    
        // Start the ball rolling
        setTimeout(fadeDivs, 3000);
    });
    

    The images are licensed under blah blah who cares, bring on the lawsuit for me stealing your beach 😉

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.