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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:18:05+00:00 2026-06-03T14:18:05+00:00

First, I tried to create a looping animation like this fiddle : function rotator()

  • 0

First, I tried to create a looping animation like this fiddle:

function rotator() {
  $('#foo').stop(true).delay(500).fadeIn('slow').delay(2500).fadeOut('slow',rotator);
}
$('#foo').hide();
rotator();​

This appears to skip the delay after the first iteration.

So I tried this fiddle:

function rotator() {
  $('#foo').stop(true).delay(500).fadeIn('slow').delay(2500).fadeOut('slow',rotator);
}
$('#foo').hide();
rotator();​

In this case, the fadeIn appears to jump straight to show after the first iteration.

I’m stumped. All these operations should be part of the fx queue. And even if there weren’t, I can’t explain why a fadeIn would change to a show. Any ideas?

  • 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-03T14:18:08+00:00Added an answer on June 3, 2026 at 2:18 pm

    Is this more of the affect you’re looking for:

    function rotator() {
        $( '#foo' ).delay( 500 ).fadeIn( 'slow', function() {
            $( this ).delay( 2500 ).fadeOut( 'slow', rotator );
        });
    }
    $('#foo').hide();
    rotator();
    

    Update: Figure I should explain why you’re code was having problems. In jQuery, animations are asynchronous (i.e. non-blocking). So your code was queuing the animations at the same time, but just not to run until sometime in the future. You have to run the following animation in the callback, to ensure that it doesn’t fire until the previous animation has completed.

    Another Update: Just tried the following code and it seemed to work. Give it a shot:

    function rotator() {
        $( '#foo' ).delay( 500 ).fadeIn( 'slow' ).delay( 2500 ).fadeOut( 'slow', rotator );
    }
    $('#foo').hide();
    rotator();
    

    Give it a go and let me know if it works.

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

Sidebar

Related Questions

This is the first Python script I've tried to create. I'm reading a xml
Controller First I tried this: [HttpPost] public ActionResult Edit(JournalEntry journalentry) { if (ModelState.IsValid) {
this is the first time I have tried this so I am probably missing
I have a file which has text like this: #1#14#ADEADE#CAH0F#0#0..... I need to create
I am trying to communicate between an applet and a servlet. I first tried
I am having trouble getting minizip to work on android. I first tried to
I first time tried to subClassed an NSDate to give it 2 methods that
I am trying to parse the resultlist of http://mobile.de . First I tried it
I've just started learning MATLAB, and the first thing i tried is to plot
First time when I tried to do something in WPF, I was puzzled with

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.