Results 1 to 2 of 2

Thread: Jquery Queue

  1. #1
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default Jquery Queue

    So I am wondering if it is possible to add animations to a queue, then check if that queue is finished or exists then preform add another animation queue.

    If that doesn't make sense please check (http://thebcelements.com/BnS/) on the top left or right (computer only). It's works but glitches because I need to check to see if their are still elements in the queue. Thanks.
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Oh man!! You are pretty much on your own here I think. You might be able to get a straight answer somewhere. If so, ignore what I'm about to tell you.

    First - It often does NOT help to parse out (with stops or alerts or whatever) what jQuery is 'telling' you. With lots of things, that can be useful. But with the more 'esoteric' things like jQuery events in an ongoing queue of animations, it's better not to do anything other than watch what happens manually. By that, I mean - run the code, see what happens. If you don't like it, tweak the code - run it again to see if it's now doing what you want.

    Now, as to your question. I would say no in a specific sense. But yes in a general way. jQuery isn't quite that robust yet as far as I know. At the same time, the default condition of one animation following another on the same element is to add to the queue. You can also set a callback to any animation. If that's the last one in the current series (queue) that you've setup, it will execute once the others and that one have completed. It will not be a matter of detection though. Just faith that it will execute as you've set it to. Alternatively, if that's just not going to work for some reason, you can setup a generic poll at the same time you set in notion the first event in the queue. It can detect a condition (which presumably indicates the completion of said queue) and then set off another chain of code/events. You can combine the two approaches. Have all events execute the same callback that will call the next bit of code only if a certain condition or conglomeration of conditions obtain. I've done that, works well. In fact, it's the essence of determining when to proceed if and only after all images in a set of images have loaded for example.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Replies: 4
    Last Post: 08-26-2012, 02:21 PM
  2. Synchronous number of queue
    By newbieCoder in forum JavaScript
    Replies: 0
    Last Post: 02-07-2012, 04:53 PM
  3. jQuery Multi Level CSS Menu #2 not working in IE6 using jQuery 1.4.x
    By Rikko in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 12-28-2010, 10:57 PM
  4. Replies: 0
    Last Post: 10-18-2010, 12:05 PM
  5. Queue OverFlow
    By nareshgovindaswamy in forum Java
    Replies: 0
    Last Post: 03-29-2007, 08:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •