JavaScript/Library/script.aculo.us/EffectQueue http://www.ark-web.jp/sandbox/wiki/285.html

JavaScript/Library/script.aculo.us

JavaScript/Library/script.aculo.us/EffectQueue

ËÝÌõÃæ

[edit]

Effect Queues

[edit]

What is a Queue

queue¤ÎÃæ¤Ç¤É¤Î¤è¤¦¤Ê¥¤¥Ù¥ó¥È¤¬µ¯¤³¤ë¤«: ¥×¥í¥°¥é¥Þ¡¼¤Ë¤È¤Ã¤Æqueue¤È¤Ï¸Ä¡¹¤Ë¥Ï¥ó¥É¥ë¤µ¤ì¤ª¸ß¤¤¤ËÀѤ߽Ťͤé¤ì¤¿¥¤¥Ù¥ó¥È¤ÎÇÛÎó¤Ç¤¹¡£
Let¡Çs examine how events in a queue occur: For a programmer a queue is an Array with events that are stacked on each other to be handled one by one.
For example, a user hovers over a button with his cursor and then after half a second leaves the button area again.
Î㤨¤Ð¡¢¤¢¤ë¥æ¡¼¥¶¡¼¤¬¥«¡¼¥½¥ë¤ò¥Ü¥¿¥ó¤ËºÜ¤»¤Æ¡¢¤½¤·¤Æ¤½¤Î0.5Éøå¤Ë¥Ü¥¿¥ó¤«¤é¥«¡¼¥½¥ë¤òÎ¥¤·¤¿¤È¤·¤Þ¤¹¡£
Two events have taken place, the mouseover and the mouseout.
Æó¤Ä¤Î¥¤¥Ù¥ó¥È¤¬È¯À¸¤·¤Þ¤¹¡£mouseover¤Èmouseout¤Ç¤¹¡£
If you would handle the mouseover and the mouseout event takes place, it could disturb your current process.
mouseover¤Èmouseout¤ÎÆó¤Ä¤Î¥¤¥Ù¥ó¥È¤ÎȯÀ¸¤ò¼èÆÀ¤¹¤ë¾ì¹ç¡¢¤³¤Î¥¤¥Ù¥ó¥È¤Ï¸½ºß¤Î¥×¥í¥»¥¹¤Ë³ä¤ê¹þ¤à¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
However you can¡Çt just ignore the event, because then you will be stuck in the status that is established by the actions you have performed for mouseover.
¤·¤«¤·¡¢¤³¤Î¥¤¥Ù¥ó¥È¤ò̵»ë¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£¤Ê¤¼¤Ê¤é¡¢¤¢¤Ê¤¿¤¬mouseover¤Ë»ØÄꤷ¤¿¥¢¥¯¥·¥ç¥ó¤¬¥¹¥¿¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¤«¤é¤Ç¤¹¡£
In this situation you could add the event to a queue and every time you¡Çre done with processing an event, just check the queue for unprocessed events (and act accordingly).
¤³¤Î¾ì¹ç¡¢¤¢¤Ê¤¿¤Ï¥¤¥Ù¥ó¥È¤òqueue¤ËÄɲä·¡¢¥¤¥Ù¥ó¥È¤Î½èÍý¤ò½ªÎ»¤¹¤ëÅÙ¤Ëqueue¤Î̤½èÍý¤Î¥¤¥Ù¥ó¥È¤ò¥Á¥§¥Ã¥¯¤Ç¤­¤Þ¤¹¡£(¤½¤·¤Æ¼Â¹Ô¤¹¤ë)

[edit]

How do Effects work and why do you need a Queue

The same happens when you are dealing with Effects and you face the situation where two effects can be called, both of which manipulate the same DOM object(s).
ƱÍͤΤ³¤È¤¬¥¨¥Õ¥§¥¯¥È¤Î½èÍý¤Ç¤âµ¯¤³¤ê¤Þ¤¹¡£Æó¤Ä¤Î¥¨¥Õ¥§¥¯¥È¤¬¸Æ¤Ó½Ð¤µ¤ì¡¢¤½¤ì¤é¤¬Æ±°ì¤ÎDOM¥ª¥Ö¥¸¥§¥¯¥È¤ò°·¤¦¾ì¹ç¤Ç¤¹¡£
script.aculo.us comes to the rescue with several techniques to manage your effects.
script.aculo.us¤Ï½ê¡¹¤Î¥Æ¥¯¥Ë¥Ã¥¯¤Ç¥¨¥Õ¥§¥¯¥È¤Î´ÉÍý¤ò½õ¤±¤Þ¤¹¡£
To explain this further, we will show you how things work by example.
¤É¤Î¤è¤¦¤ËÆ°¤¯¤Î¤«Îã¤ÇÀâÌÀ¤·¤Þ¤¹¡£

Let¡Çs start creating two effects

div (id=¡Étest1¡É) ¤È¤Ê¤ó¤é¤«¤Î¥³¥ó¥Æ¥ó¥Ä¤Ç¥Ú¡¼¥¸¤òºî¤ê¤Þ¤¹, Example 1 ¤È̾¤Å¤±¤Þ¤¹. ¤³¤Î¥Ú¡¼¥¸¤Ïonload¤Ç¼¡¤ÎÆó¤Ä¤Î¥¨¥Õ¥§¥¯¥È¤ò¼Â¹Ô¤·¤Þ¤¹:

new Effect.SlideDown('test1');
new Effect.SlideUp('test1');

These effects are executed in parallel and thus one effects tries to slide the div down and the other to slide it up. Its doesn¡Çt work and you only see some flickering.
¤³¤Î¥¨¥Õ¥§¥¯¥È¤ÏÊÂÎó¤Ë¼Â¹Ô¤µ¤ì¡¢°ì¤Ä¤Ïdiv¤ò¥¹¥é¥¤¥É¥À¥¦¥ó¤·¡¢¤â¤¦°ì¤Ä¤Ï¥¹¥é¥¤¥É¥¢¥Ã¥×¤·¤Þ¤¹¡£¤³¤Î¥¨¥Õ¥§¥¯¥È¤ÏÆ°¤«¤º¤Ë¡¢¤Á¤é¤Ä¤¯¤À¤±¤Ç¤¹¡£
However a similar thing occurs when you call ¡Ènew Effect.Slide Down?(¡Ætest1¡Ç);¡É with a onclick and then ¡Ènew Effect.SlideUp(¡Ætest1¡Ç);¡É with a onclick to during the first effect.
»÷¤¿¤è¤¦¤Ê¤³¤È¤¬¡¢¡Ènew Effect.Slide Down?(¡Ætest1¡Ç);¡É¤òonclick¤Ë»ØÄꤷ¡¢¤³¤Î¥¨¥Õ¥§¥¯¥ÈÃæ¤Ë¡Ènew Effect.SlideUp(¡Ætest1¡Ç);¡É¤òonclick¤Ë»ØÄꤷ¤¿¾ì¹ç¤Ëµ¯¤³¤ê¤Þ¤¹¡£
When you do this several times (quickly), you will see that the effects don¡Çt work anymore.
²¿ÅÙ¤«¤³¤ì¤ò¹Ô¤¦¤È¥¨¥Õ¥§¥¯¥È¤¬Æ°ºî¤·¤Ê¤¤¤Î¤¬³Îǧ¤Ç¤­¤ë¤Ç¤·¤ç¤¦¡£
The same problem also occurs in many other situations. That¡Çs why we need Effect.Queue.
ƱÍͤÎÌäÂê¤Ï¾¤Î¿¤¯¤Î¥·¥Á¥å¥¨¥·¥ç¥ó¤ÇȯÀ¸¤·¤Þ¤¹¡£¤½¤ì¤Çqueue¤¬É¬Íפˤʤê¤Þ¤¹¡£

[edit]

Effect.Queue

The previous examples gave you an idea of the situations you could be facing without Queues.
ľÁ°¤ÎÎã¤Ïqueue̵¤·¤ÇȯÀ¸¤¹¤ëÌäÂê¤ÎÎã¤Ç¤¹¡£
This must give you some motivation to find how Effect.Queue could improve your live and help you to manage your Effects.
¤É¤Î¤è¤¦¤Ëqueue¤¬¥¨¥Õ¥§¥¯¥È¤Î´ÉÍý¤ò½õ¤±¤ë¤«¤ò¹Í¤¨¤ë»É·ã¤ò¤¢¤Ê¤¿¤Ë¤¢¤¿¤¨¤ë¡£
Effect.Queue is an improved array of Effects (called Enumerable) that is global for the entire page.
Effect.Queue¤ÏEnumerable¤È¸Æ¤Ð¤ì¤ë¥¨¥Õ¥§¥¯¥È¤ÎÇÛÎó¤Ç¤¹¡£¤³¤ì¤Ï¥Ú¡¼¥¸Á´ÂΤËÂФ·¤Æ¥°¥í¡¼¥Ð¥ë¤Ç¤¹¡£
It gets created by extracting the global queue from Effect.Queues (we will discuss this later).
So all effects you want to queue will be added to the ¡Æglobal¡Ç queue.
¤è¤Ã¤Æ¡¢queue¤ËÄɲ䵤ì¤ë¤¹¤Ù¤Æ¤Î¥¨¥Õ¥§¥¯¥È¤Ï¥°¥í¡¼¥Ð¥ë¤Êqueue¤ËÄɲ䵤ì¤Þ¤¹¡£
You might be wondering how to add an effect to the queue? Well it¡Çs quite easy.
¤É¤Î¤è¤¦¤Ë¥¨¥Õ¥§¥¯¥È¤òqueue¤ËÄɲ乤뤫¡©¡¡¤½¤ì¤Ï´Êñ¤Ç¤¹¡£

When you are creating an effect, you can pass several arguments.
¥¨¥Õ¥§¥¯¥È¤ÎºîÀ®»þ¤Ë¤¤¤¯¤Ä¤«¤Î°ú¿ô¤òÅϤ¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
Let¡Çs look at How effects are created.
¥¨¥Õ¥§¥¯¥È¤¬¤É¤Î¤è¤¦¤ËºîÀ®¤µ¤ì¤ë¤«¡£
The first argument is the DOM element you wish to manipulate, but you already know that.
ºÇ½é¤Î°ú¿ô¤ÏÁàºî¤·¤¿¤¤DOMÍ×ÁǤǤ¹¡¢¤·¤«¤·´û¤Ë¤´Â¸ÃΤǤ·¤ç¤¦¡£
The second argument is actually an array of options that you can pass along, let¡Çs examine that for Effect.Queue.
2ÈÖÌܤΰú¿ô¤Ï¡¢ÅϤ¹¤³¤È¤Î¤Ç¤­¤ë¥ª¥×¥·¥ç¥ó¤ÎÇÛÎó¤Ç¤¹¡¢Effect.Queue¤Î¤½¤ì¤Ë¤Ä¤¤¤Æ¸«¤Æ¤¤¤­¤Þ¤·¤ç¤¦¡£
We will use Effect.SlideDown and Effect.SlideUp like in the previous examples.
Á°²ó¤ÎÎã¤ÈƱÍͤËSlideDown¤ÈSlideUp¤ò»È¤¤¤Þ¤¹¡£

new Effect.SlideDown('test1');
new Effect.SlideUp('test1', { queue: 'end'});

So you see I have added an array containing an entry ¡Èqueue:¡É with the value ¡Èend¡É.
"end"¤È¤¤¤¦Ãͤò»ý¤Ä"query:"¤È¤¤¤¦¥¨¥ó¥È¥ê¤ò´Þ¤àÇÛÎó¤òÄɲä·¤Þ¤·¤¿¡£
This means that the Effect will be inserted at the end of the ¡Èglobal¡É Queue.
¤³¤ì¤Ï¡¢¥¨¥Õ¥§¥¯¥È¤¬¥°¥í¡¼¥Ð¥ë¤Êqueue¤ÎºÇ¸å¤ËÁÞÆþ¤µ¤ì¤ë¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£
All effects are always added to the queue, however without a position like ¡Æend¡Ç they are always executed parallel to the other effects.
Á´¤Æ¤Î¥¨¥Õ¥§¥¯¥È¤Ï¾ï¤Ë¥­¥å¡¼¤ËÄɲ䵤ޤ¹¤¬¡¢"end"¤È¤¤¤¦°ÌÃÖ¤¬»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¤Ï¾ï¤Ë¾¤Î¥¨¥Õ¥§¥¯¥È¤ÈÊ¿¹Ô¤·¤Æ¼Â¹Ô¤µ¤ì¤Þ¤¹¡£

Let¡Çs take a look at the improved example 1.
²þÁ±¤µ¤ì¤¿example 1¤ò¸«¤Æ¤ß¤Þ¤·¤ç¤¦¡£
You see that first the element slides down and then it slides back up again.
ºÇ½é¤Ë¥¨¥ì¥á¥ó¥È¤¬¥¹¥é¥¤¥É¥À¥¦¥ó¤·¡¢¤½¤Î¸å¥¹¥é¥¤¥É¥¢¥Ã¥×¤·¤ÆÌá¤ë¤Î¤¬³Îǧ¤Ç¤­¤Þ¤¹¡£
There is also an option to insert the Effect at the front of the queue.
¥¨¥Õ¥§¥¯¥È¤òqueue¤ÎºÇ½é¤ËÁÞÆþ¤¹¤ë¥ª¥×¥·¥ç¥ó¤â¤¢¤ê¤Þ¤¹¡£
You would use ¡Æfront¡Ç instead of ¡Æend¡Ç in that case.
¤½¤Î¾ì¹ç¡¢"end"¤ÎÂå¤ï¤ê¤Ë"front"¤ò»È¤¤¤Þ¤¹¡£

new Effect.SlideUp('test1', {queue: 'end'});
new Effect.SlideDown('test1', {queue: 'front'});

This would place the SlideDown before the SlideUp effect (same as the previous examples). The argument you pass as ¡Èqueue:¡É is called a position and it can be used with a different syntax, but we will go into that later.
¤³¤ì¤Ï¡¢SlideDown¤òSlideUp¤ÎÁ°¤ËÇÛÃÖ¤·¤Þ¤¹(Á°²ó¤ÎÎã¤ÈƱ¤¸)¡£ ¤¢¤Ê¤¿¤Î°ú¿ô¤È¤·¤ÆÅϤ¹"queue:"¤Ï°ÌÃ֤Ȥ·¤Æ¸Æ¤Ð¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¤½¤ì¤ÏÊ̤ι½Ê¸¤Ç»ÈÍѤ¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¤¬¤½¤ì¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤·¤Þ¤¹¡£

Remember that JavaScript is not multi-threaded, so blocks of code are executed together when they get parsed. This causes the effects to start in parallel if no queue is defined.
JavaScript¤Ï¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤Î¤Ç¡¢¥³¡¼¥É¤Î¥Ö¥í¥Ã¥¯¤Ï¥Ñ¡¼¥¹¤µ¤ì¤¿¤È¤­¤ËƱ»þ¤Ë¼Â¹Ô¤µ¤ì¤Þ¤¹¡£¤³¤ì¤¬¸¶°ø¤Ç¡¢queue¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤»þ¤Ï¥¨¥Õ¥§¥¯¥È¤ÏÊÂÎó¤Ë¼Â¹Ô¤µ¤ì¤Þ¤¹¡£

This works nicely, doesn¡Çt it?
But what happens when you queue all kinds of effects in different places?
¤·¤«¤·¡¢ÊÌ¡¹¤Î¾ì½ê¤ÇÁ´¼ï¤Î¥¨¥Õ¥§¥¯¥È¤ò¥­¥å¡¼¤·¤¿¤È¤­¤Ë²¿¤¬µ¯¤³¤Ã¤Æ¤¤¤ë¤Î¤Ç¤·¤ç¤¦¤«¡©
You could have lots of effects that you would like to queue but they don¡Çt all relate to each other.
¤¢¤Ê¤¿¤¬¥­¥å¡¼¤·¤¿¤¤¥¨¥Õ¥§¥¯¥È¤Ï¤¿¤¯¤µ¤ó¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤½¤Î¥¨¥Õ¥§¥¯¥È¤ÏÁ´¤Æ¤¬¸ß¤¤¤Ë´Ø·¸¤·¤¢¤Ã¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
This is where Effect.ScopedQueue comes in.
¤½¤³¤Ç¡¢Effect.ScopedQueue¤¬Ìò¤ËΩ¤Á¤Þ¤¹¡£

[edit]

Basic Effect.ScopedQueue

As explained before, the default Queue is ¡Æglobal¡Ç.
´û¤ËÀâÌÀ¤·¤¿¤è¤¦¤Ë¥Ç¥Õ¥©¥ë¥È¤ÎQueue¤Ï¥°¥í¡¼¥Ð¥ë¤Ç¤¹¡£
All effects are placed in the ¡Æglobal¡Ç Queue unless you define a different scope.
¤¹¤Ù¤Æ¤Î¥¨¥Õ¥§¥¯¥È¤ÏÊ̤Υ¹¥³¡¼¥×¤òÄêµÁ¤·¤Ê¤¤¸Â¤ê¥°¥í¡¼¥Ð¥ë¤Îqueue¤ËÇÛÃÖ¤µ¤ì¤Þ¤¹¡£
A scope is nothing more than grouping a set of Effects together in their own Queue.
¥¹¥³¡¼¥×¤Ï¤½¤ì¤¾¤ì¤Îqueue¤ÎÃæ¤Ç¥°¥ë¡¼¥×²½¤µ¤ì¤¿¥¨¥Õ¥§¥¯¥È¤Î¥»¥Ã¥È°Ê¾å¤Î¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
To do this, you need to pass an array instead of a string to the ¡Èqueue:¡É option (so you have an array inside the outer array).
¤³¤ì¤ò¹Ô¤¦¤Ë¤Ï¡¢"queue:"¥ª¥×¥·¥ç¥ó¤Ëʸ»úÎó¤ÎÂå¤ï¤ê¤ËÇÛÎó¤òÅϤ¹É¬Íפ¬¤¢¤ê¤Þ¤¹(¤Ä¤Þ¤ê³°Éô¤ÎÇÛÎó¤ÎÃæ¤ËÇÛÎó¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ê¤Þ¤¹)¡£
This can only be done by using a different syntax to define the Queue position.
¤³¤ì¤Ïqueue¤Î°ÌÃÖ¤òÄêµÁ¤¹¤ë¤Î¤ËÊ̤ι½Ê¸¤ò»ÈÍѤ¹¤ë¤³¤È¤Î¤ß¤Ë¤è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤Þ¤¹¡£

// small and easy syntax
new Effect.SlideUp('test1', {queue:'end'});
// syntax that allows for more tuning
new Effect.SlideUp('test1', {queue: {position:'end'} });

The two examples are identical produce identical behaviour.
Æó¤Ä¤ÎÎã¤ÏƱÍͤÎÆ°ºî¤òÀ¸¤ß½Ð¤·¤Þ¤¹¡£
However, the second syntax allows you to define a scope (a different queue) with the following syntax:
¤·¤«¤·¡¢ 2ÈÖÌܤι½Ê¸¤Ï¥¹¥³¡¼¥×(°Û¤Ê¤ëqueue)¤ÎÄêµÁ¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£¼¡¤Î¹½Ê¸:

new Effect.SlideUp('menu', {queue: {position:'end', scope: 'menuxscope'} });
new Effect.SlideUp('bannerbig', {queue: {position:'end', scope: 'bannerscope'} });
new Effect.SlideDown('menu', {queue: {position: 'end', scope: 'menuxscope'} });
[edit]

¤³¤³¤Þ¤ÇËÝÌõ

The ¡Èscope:¡É argument has defined a separate queue named ¡Æmenuxscope¡Ç. This queue could for example contain all menu-related effects. A second scope named ¡Èbannerscope¡É is defined, it could contain all banner-related effects. In what order are these separate queues executed? First both 1 and 2 get executed, and when 1 is done 3 is executed. Check example 3 for a preview

Just remember, if you don¡Çt define a scope, the effect is added to the default ¡Èglobal¡É scope, which can be accessed from Effect.Queue.
Limit

Sometimes too many effects get queued, for example when a user presses a button twice, or repeatedly enters and leaves a button hover area (and each time two effects are queued). This can cause a lot of distracting activity. To prevent this, we can add a ¡Èlimit: n¡É option to the queue so no more than n effects are added to that ScopedQueue.

new Effect.SlideDown('menu', {queue: {position:'end', scope: 'menuxscope', limit:2} }); // #1
new Effect.Highlight('menu', {queue: {position:'end', scope: 'menuxscope', limit:2} }); // #2
new Effect.SlideUp('menu', {queue: {position: 'end', scope: 'menuxscope', limit:2} }); // #3

#1 and #2 will be added to the queue but #3 will not.

This covers the queue for Effects, lets move on to Effect.Queues and the rails helper.
Effect.Queues

So what is Effect.Queues and why do we need it? Well, for each scope an instance of Effect.Scoped Queue? is created. That instance is stored in Effect.Queues. You can access it by using Effect.Queues.get(¡Æglobal¡Ç) which is the same as Effect.Queue because the default ¡Æglobal¡Ç queue is saved into Effect.Queue by script.aculo.us. However when you need to access a scope other than ¡Æglobal, you need to fetch it using Effect.Queues.get(¡Æmyscope¡Ç) before you can manipulate it.

var queue = Effect.Queues.get('myscope');

ScopedQueue manages the ¡Æeffects¡Ç, this is an internal system accessed by the Effect object. However you can, if you wish, add effects to the queue and remove them by yourself. Note that this requires some knowledge about the internal workings of the system.

ScopedQueue is just an Enumerable object. You can retrieve the effects one by one and manipulate them. Let¡Çs look at how we can ¡Æempty a queue¡Ç.

var queue = Effect.Queues.get('myscope');
queue.each(function(e) { e.cancel() });

Or maybe you want to change the interval between the effects in a queue:

Effect.Queues.get('myscope').interval = 100;

Rails helper

At the time of this writing there is only limited support for the queue element of Effects. However a patch (#3530) for improved support has been submitted. It will allow you to use the following syntax when you use rails:

visual_effect :slide_up, {:queue => 'end'} // only define position
visual_effect :slide_up, {:queue => {:position => 'end', :scope => 'myscope', :limit => 5}}

Note that this functionality currently only works with EdgeRails and with the patch applied. However you can use the JavaScript with the latest source from script.aculo.us.
Example

To wrap up the tutorial (which is followed by reference documentation and some useful links) we have made an example of how the queues would turn up with the code we wrote.

To fully master queues, you have to be familiar with how Effects and Enumerable work.
Reference documentation

The Effect.Queues object
Method Kind Return Arguments Description
get(scopeName) ??? Scoped Queue? object scopename: string scopeName: the name of the scope of the queue

var queue = Effect.Queues.get(¡Æmyscope¡Ç);

Queue parameter for Effects
Property Type Description
queue string position of the Effect in the queue. Can be both ¡Æfront¡Ç or ¡Æend¡Ç

new Effect.Slide Up?(¡Æmenu¡Ç, {queue: ¡Æfront¡Ç });
new Effect.Slide Down?(¡Æmenu¡Ç, {queue: ¡Æend¡Ç });

Queue parameter options for Effect
Property Type Description
position string position of the Effect in the queue. Can be both ¡Æfront¡Ç or ¡Æend¡Ç
scope string the Scope Queue? to add the Effect to. Default to ¡Æglobal¡Ç
limit string the maximum numbers of ¡Æactive¡Ç or ¡Æidle¡Ç effects

new Effect.SlideUp('menu', {queue: {position:'front', scope: 'myscopeone'} });
new Effect.SlideDown('menu', {queue: {position:'end', scope: 'myscopetwo'} });

Much of this initial content was created by Abdur-Rahman Advany on his blog, blog.railsdevelopment.com. On 4 November, 2006, he gave permission on his blog for his excellent tutorial to be used here under the Script.aculo.us license.
For now, see the excellent article on Effect Queues here:
http://blog.railsdevelopment.com/pages/effect/queue/

»²¹Í¡§Effect Queues

tag: Effects?, JavaScript, Tween?


¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2007-12-13 (ÌÚ) 11:03:00 (5979d)

¥¢¡¼¥¯¥¦¥§¥Ö¤Î¥µ¡¼¥Ó¥¹¤ä¥½¥ê¥å¡¼¥·¥ç¥ó¤Ï¤³¤Á¤é