# Effect queues with RJS templates and scriptaculous

**URL:** <https://www.ruby-forum.com/t/effect-queues-with-rjs-templates-and-scriptaculous/70083>\
**Category:** Rails\
**Created:** [February 18, 2006, 1:24pm UTC](https://www.ruby-forum.com/t/effect-queues-with-rjs-templates-and-scriptaculous/70083 "2006-02-18T13:24:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 18, 2006, 1:24pm UTC](https://www.ruby-forum.com/t/effect-queues-with-rjs-templates-and-scriptaculous/70083/1 "2006-02-18T13:24:05Z")

</div>

Hi. I was wondering if it’s possible to combine effects for  
individual elements with RJS templates. I notice that scriptaculous  
has support for a concept called effect queues  
([http://www.railsdevelopment.com/2006/01/15/effectqueue/](http://www.railsdevelopment.com/2006/01/15/effectqueue/)). Is there  
anyway to use these queues from rjs?

---

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 18, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/effect-queues-with-rjs-templates-and-scriptaculous/70083/2 "2006-02-18T18:01:58Z")

</div>

Glen,

You can use the effect queues from RJS by passing the :queue option to  
visual\_effect.

A simple example:

page.visual\_effect :highlight, ‘first’, :queue =\> ‘end’  
page.visual\_effect :highlight, ‘second’, :queue =\> ‘end’  
page.visual\_effect :highlight, ‘third’, :queue =\> ‘front’

It doesn’t look like scoped queues will work yet, though.

On 2/18/06, Glen S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi. I was wondering if it’s possible to combine effects for  
> individual elements with RJS templates. I notice that scriptaculous  
> has support for a concept called effect queues  
> ([http://www.railsdevelopment.com/2006/01/15/effectqueue/](http://www.railsdevelopment.com/2006/01/15/effectqueue/)). Is there  
> anyway to use these queues from rjs?
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Cody F.  
[http://www.codyfauser.com](http://www.codyfauser.com)

---

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 18, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/effect-queues-with-rjs-templates-and-scriptaculous/70083/3 "2006-02-18T18:17:07Z")

</div>

Hi,

Well I have made a patch for supporting visual\_effect but it isn’t  
applied yet.  
[http://dev.rubyonrails.org/ticket/3530](http://dev.rubyonrails.org/ticket/3530)
