Okay, thanks to everyone who responded, I really appreciate the help.
Unfortunately this is turning out to be a tougher problem to solve
than I first thought.

Basically, what needs to happen is 1) All elements that have not been
selected and are visible need to fade out. 2) All elements that have
been selected need to move to new positions (which will be computed by
their order in the DOM and an x/y grid). 3) All elements that have
been selected but which are invisible need to face in.

The 3 animation steps need to occur in unison on all affected
elements.  Using Erik's technique it's fairly easy to get steps 1 and
3 to happen in sequence, but step 2 is proving the real tricky one,
because each element is moving to a different position and therefore
needs its own animate () call, but all these elements have to move in
unison.  Erik's technique will only allow them to move one at a time
(as far as I can tell).  Brandon's plugin seemed like the way to go
but unfortunately it doesn't seem possible to get it to animate a
group of elements as one but have each group selected animate in
sequence.

Mark's idea looked like the simplest one to pull off, but it seems to
cause weird effects to happen for reasons I can't figure out.  The
same group of elements gets repeatedly faded in 10-12 times before the
animation finally stops.

On May 24, 11:47 am, Gordon <[EMAIL PROTECTED]> wrote:
> I've already posted on this topic before, but I really am gettign
> quite desperate as the project deadline looms and I still don't have a
> solution.
>
> I need several animations to happen, but I need them to happen in
> sequence rather than all at once (first animation: hide unselected
> items.  Second animation: Move visible items to new locations to
> occupy space taken by unselected items/make space for currently hidden
> selected items. Third animation: Reveal currently hidden selected
> items).
>
> I tried using the callback method, but this has a serious drawback for
> my purposes, in that if one of the animations in the chain doesn't
> occur (because no items were unselected but some new ones were
> selected, for example) then all subsequent animations don't occur
> either.  If a jQuery selector returns 0 results then applied effects
> aren't executed.
>
> What I need is some code that will ececute my animations one after the
> other, but which doesn't depend on all animations in the chain being
> triggered for the subsequent animations to play.  Is there a plugin
> for doing this? Or is it slated as a new feature for jQuery?  Or has
> anyone else come up with a solution to the problem?
>
> Sorry to keep asking this but like I said, it's getting pretty urgent.

Reply via email to