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

  • Home
  • SEARCH
  • 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 6671361
In Process

The Archive Base Latest Questions

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

I have image slider where images replace each other by timeout. I use jQuery

  • 0

I have image slider where images replace each other by timeout. I use jQuery function setInterval() but there is a small problem, after minimizing browser windows this function keep “working”, and where I restore browser window images replace each other with incrediable high speed, like the whole time after window was minimized setInterval() collect actions but executing them after restoring the window.

How to pause setInterval() on browser minimize or keep swap images when windows is minimized?

  • 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-26T03:22:47+00:00Added an answer on May 26, 2026 at 3:22 am

    The documentation for animate() explicitly mentions:

    Because of the nature of requestAnimationFrame(), you should never
    queue animations using a setInterval or setTimeout loop. In order to
    preserve CPU resources, browsers that support requestAnimationFrame
    will not update animations when the window/tab is not displayed. If
    you continue to queue animations via setInterval or setTimeout while
    animation is paused, all of the queued animations will begin playing
    when the window/tab regains focus. To avoid this potential problem,
    use the callback of your last animation in the loop, or append a
    function to the elements .queue() to set the timeout to start the next
    animation.

    So, you can either call setTimeout() in the callback of your animation to chain the next cycle, if possible, or queue() the calls to setTimeout() between the calls to animate().

    EDIT: As requested in comments, here is a simple queue() example. The code below enforces a two-second delay between the slide animations:

    $("selector").slideUp("slow").queue(function(next) {
        window.setTimeout(next, 2000);
    }).slideDown("slow");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to make an image slider with jquery I have 5 jpg images
I'm using jQuery Tools Plugin as image slider ( image here ), but due
I have an image slider that is positioned over a background image but I
I have a folder containing images. I want to have an image slider, like
I have what is essentialy an image slider. I have a list of images:
I have got a jquery image slider on my webpage , when i try
I have created a XML image gallery, which displays text in between each slide.
I have a simple slideshow which automatticlly changes the image using setInterval every 5
So I have a nav with 3 circles, and a jquery slider. By default
I have an image slider ( NivoSlider ) which simply fades through a range

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.