Queueing Effect.Parallels in Scriptaculous doesn't work
Posted
by Matthew Robertson
on Stack Overflow
See other posts from Stack Overflow
or by Matthew Robertson
Published on 2010-03-29T07:35:30Z
Indexed on
2010/03/29
7:43 UTC
Read the original article
Hit count: 608
Each block of animations, grouped in an Effect.Parallel, runs simultaneously. That works fine.
Then, I want each of the Effect.Parallels to trigger sequentially, with a delay. The second block doesn't wait its turn. It fires when the function is run. Why?!
///// FIRST BLOCK /////
new Effect.Parallel([
new Effect.Morph...
], { queue: 'front' });
///// SECOND BLOCK /////
new Effect.Parallel([
Element.toggleClassName($$('#add_comment_button .glyph').first(), 'yay')
], { sync: true, queue: 'end', delay: 1 });
///// THIRD BLOCK /////
new Effect.Parallel([
new Effect.SlideUp...
], { queue: 'end', delay: 4 });
© Stack Overflow or respective owner