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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:40:46+00:00 2026-05-23T03:40:46+00:00

so i have this script that is simply fading p tags in and out

  • 0

so i have this script that is simply fading p tags in and out and cycling through them. For some reason if i leave the page open for awhile, they stop fading out and just start stacking on top of eachother. It takes awhile for it to happen and I think it only happens in chrome.

$(document).ready(function(){

   var current_quote = 0,
   fade_interval = null,
   num_quotes = $("#quotes p").length;

  // Fade in the first quote.
   $("#quote0").fadeIn(2500);

  // Schedule for the inital fade out.
  setTimeout(fadeQuotes, 6000);

  function fadeQuotes() {
    // Fade out the current quote.
    $("#quote" + current_quote).fadeOut(2500, function() {
    // Fade in the next quote.
    current_quote = (current_quote + 1) 
    if(current_quote+1 > num_quotes)
    {
        current_quote=0;
    }
    current_quote = current_quote % num_quotes;
    $("#quote" + current_quote).fadeIn(2500);
    });


    // Set the fading interval, if it's not already set.
    if (fade_interval == null) {
      fade_interval = setInterval(fadeQuotes, 13010);
    }
  }


});
  • 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-23T03:40:47+00:00Added an answer on May 23, 2026 at 3:40 am

    Chrome sets timeout min to 1 second when page is in hidden tab. It’s a bit weird.

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

Sidebar

Related Questions

I have a simple script that does some search and replace. This is basically
If I have a simple web page and script that looks like this: <body>
Okay so I have a bash script that simply downloads a web page, and
I have this code that simply validates a date, but ends the script if
I have a PHP script that simply takes some data, separates it into tab
I have a PHP script that runs as a background process. This script simply
I have this simple script that I'm working on. I must admit, I'm totally
We have a ubuntu test server that this simple script works fine on where
I have this simple code that speaks for itself. <script language='javascript"> function check() {}
I have this script that run to fix my menu bar to the browser

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.