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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:36:20+00:00 2026-06-05T20:36:20+00:00

Some related questions I found from searching: How does the 'fx' queue in jquery

  • 0

Some related questions I found from searching:

How does the 'fx' queue in jquery auto start?

What are queues in jQuery?

I’ve read through the documentation on animate() for jquery but I am having some difficulty figuring out a solution to my problem.

What I am looking to do is queue up a series of animations on multiple elements. I want the animations to act in sequence, that is I want the current animation on an element to block animations on its own element, but not block animations on the other element.

Finally I want to be able to cancel the animations on one of the elements but allow the animations on the other(s) to continue.

I think that named jquery queues is what I want, however attempting that gave me animations that never started (I think this is due to the magic that is the ‘fx’ queue not being present on every other queue).

Thanks in advance!

EDIT:

Here’s what I am kind-of looking for:

function someAnimationWrapper(queueName, element, animation) {
    ///<summary>
    /// Places the animation specified into the queue of animations to be
    ///  run on that element.  The animation queue is a named queue so 
    ///  animations in the queue can be stopped at any time.
    ///</summary>
    ///<param name="queueName" type="String">
    /// The name to assign to the element's animation queue.
    ///</param>
    ///<param name="element" type="jQuery">
    /// jQuery object to perform the animations on.
    ///</param>
    ///<param name="animation" type="Object">
    /// Animation properties for the animation call.
    ///</param>

    // TODO: If magic needs to be done here this is a placeholder
    element.animate(animation);
}

function magicallyStopMyQueue(queueName, clearQueue, jumpToEnd) { // May take element, whatever I need to get the job done
    ///<summary>Mirrors jQuery.prototype.stop(), but with the named queue.</summary>
    ///<param name="queueName" type="String">
    /// Animation queue to stop.
    ///</param>
    ///<param name="clearQueue" type="Boolean">
    /// See jQuery.prototype.stop()
    ///</param>
    ///<param name="jumpToEnd" type="Boolean">
    /// See jQuery.prototype.stop()
    ///</param>

    // TODO: some magics here
}

var e1 = $('.myDiv1'),
    e2 = $('.myDiv2');

someAnimationWrapper('firstQueue', e1, { properties: { left: '-=16' }, duration: 100 });
someAnimationWrapper('firstQueue', e1, { properties: { left: '-=16' }, duration: 100 });
someAnimationWrapper('firstQueue', e1, { properties: { left: '-=16' }, duration: 100 });
someAnimationWrapper('secondQueue', e2, { properties: { left: '-=16' }, duration: 100 });
someAnimationWrapper('secondQueue', e2, { properties: { left: '-=16' }, duration: 100 });
someAnimationWrapper('secondQueue', e2, { properties: { left: '-=16' }, duration: 100 });

// Now I want to stop the first one
magicallyStopMyQueue('firstQueue', true, true);
  • 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-05T20:36:21+00:00Added an answer on June 5, 2026 at 8:36 pm

    If I understand correctly then you are worrying unnecessarily. The behaviour you want is the natural jQuery animation behaviour in which each element has its own queue, and there’s no particular reason not to use the default “fx” queue unless some other aspect of the application requires it.

    DEMO

    You will see in the demo that the positions of a red and green block can be independently controlled and their movement independently stopped.

    Most of the code exists to achieve the nice layout. The operative bits are the animations object literal (a bunch of named css maps) and the anonymous click handler attached to the edge controls (which invokes the appropriate css map to cause the selected block to move to the demanded position).

    The only thing you might want to do differently is to handle non-numeric animations (eg. class switching). jQuery’s .animate() only handles the animation of numeric css values but the good news is that non-numeric stuff can be handled without too much difficulty if required (see .queue() and .dequeue()).

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

Sidebar

Related Questions

I've just read some related questions that came up when I typed the subject,
I've been searching this site and found some answers related to setting an alarm.
I've found some questions that seem related to this one, but none describes exaclty
I've look for this, and there's some related questions, but no one gives me
I have Used Dojo 1.0, but I have some version related questions: When will
All my questions in this topic related to asp.net 2.0 While working on some
I have some questions about using MySQLi queries, and related memory management. Suppose I
I have some security related service running on my machine (start type = automatic)
I've google it and also looked some related questions here in SO, but didn't
I see some related questions have been asked, but they're either too advanced for

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.