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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:00:49+00:00 2026-05-25T06:00:49+00:00

Background I am working on a project that relies heavily on JQuery .animate(), it

  • 0

Background

I am working on a project that relies heavily on JQuery .animate(), it occasionally receives external updates via Socket.io that call animate(). When the window is open, everything runs fine and animate calls can run asynchronously.

Problem

However, when the browser is minimized or a different tab is open then reopened, all the animations that should have been run while it was closed are queued up and run in that they were received.

Here is the animate call:

$(div).animate({
  'top': this.topPos(),
  'right': this.rightPos()
}, 100);

Is there a simple way to add on option to the animate() call or call some jquery function or should I just add the appropriate logic to the application?

Thanks.

  • 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-25T06:00:50+00:00Added an answer on May 25, 2026 at 6:00 am

    use .stop(true,true) by passing true as both parameters

    .stop( [clearQueue], [jumpToEnd] )
    
    clearQueue: A Boolean indicating whether to remove queued animation as well. Defaults to false.
    
    jumpToEnd:  A Boolean indicating whether to complete the current animation immediately. Defaults to false.
    

    in your example it will be applied like:

    $(div).stop(true,true).animate({
      'top': this.topPos(),
      'right': this.rightPos()
    }, 100);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I am working on a project that runs in an embedded web browser
Background: Trevor was working on a test project solely for the purpose of trying
background:Me and my coworkers are working on asp.net mvc project ... we have a
I come from a C# background and I am working on a C++ project.
I'm coming from a MS SQL Server background. Working on a new project using
Hello everybody let me give you the background first: I'm working on a project
I am working on an iOS project that loads UIImages from URLs in a
I'm working on a simple demo project so that I can learn some things
I know that it might sound silly but, while working on project at some
I'm working within a project that is part of an EAR where all the

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.