# Recent Script.aculo.us tutorial

**URL:** <https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625>\
**Category:** Rails\
**Created:** [September 16, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625 "2009-09-16T19:37:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 16, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/1 "2009-09-16T19:37:50Z")

</div>

I would like to add a visual effect to one of my web pages and in the  
stage  
where I don’t know what I don’t know. I’ve talked to my buddy Google  
about  
this and (s)he has pointed me at a number of different web pages that  
all  
seem to have 2006 dates on them. I can try looking at them more  
carefully  
(and will keep looking), but I thought I would toss my question out to  
you  
folks in the mean time.

I would like to display (in my #index view) a table of some data. Most  
(if  
not all) of the rows have other data associated with them. I would like  
to  
display a plus sign next to each row which, when clicked by the user,  
would  
expand the view to include the associated data – sort of like the way  
Gmail  
can expand and collapse “conversations”.

Can anybody point me at a recent tutorial that might get me started down  
this path?

Thanks…

–wpd

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 16, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/2 "2009-09-16T20:55:06Z")

</div>

On Wed, Sep 16, 2009 at 12:35 PM, Patrick D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I would like to add a visual effect to one of my web pages and in the stage  
> where I don’t know what I don’t know.
> 
> Can anybody point me at a recent tutorial that might get me started down  
> this path?

Sounds like you just need to learn Javascript. Doesn’t seem like a  
Rails problem/question at all.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 16, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/3 "2009-09-16T21:30:13Z")

</div>

On Wed, Sep 16, 2009 at 2:47 PM, Greg D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Wed, Sep 16, 2009 at 12:35 PM, Patrick D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Can anybody point me at a recent tutorial that might get me started down  
> > this path?
> 
> Sounds like you just need to learn Javascript. Doesn’t seem like a  
> Rails problem/question at all.
> 
> That’s a fair reply. I have read (without understanding) a number of  
> different posts about how great “RJS” is because it hides all of that  
> messy  
> Javascript from the Rails developer. I imagine one can only appreciate  
> how  
> great RJS is once one has a certain amount of Javascript experience and  
> has  
> learned how messy it can be.

I’ll head down that path. Thanks.

–wpd

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 16, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/4 "2009-09-16T22:05:56Z")

</div>

There are different paths you can take. Prototype/Scriptaculous is  
(currently) incorporated into the framework, so that can be an easy  
place to start (particularly when using rjs to deal with controller-  
type actions in your controllers).

Another route is to learn and use jQuery or another javascript  
frameworks). These may behave differently, and have benefits or  
weaknesses when compared with Prototype.

The API documentation for the frameworks themselves are really helpful  
places to start. For using them with Rails, [railscasts.com](http://railscasts.com) is a  
fantastic place to get pointers (search for ‘rjs’, ‘prototype’ or  
‘jQuery’).

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 17, 2009, 11:27am UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/5 "2009-09-17T11:27:17Z")

</div>

Hi,

you will simply need to create a div with the data in a hidden row  
below and add the javascript to the onclick option.  
This is actually so simple that it not worth encapsulating this in  
rails, imho.

Check this link:

[http://wiki.github.com/madrobby/scriptaculous/effect-appear](http://wiki.github.com/madrobby/scriptaculous/effect-appear)

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 19, 2009, 4:49am UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/6 "2009-09-19T04:49:20Z")

</div>

If you have the time get a copy of the book Ajax on Rails (O’Reilly).  
It’s excellent.

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [September 17, 2009, 11:34am UTC](https://www.ruby-forum.com/t/recent-script-aculo-us-tutorial/175625/7 "2009-09-17T11:34:12Z")

</div>

Patrick D. wrote:

> I would like to add a visual effect to one of my web pages and in the  
> stage  
> where I don’t know what I don’t know. I’ve talked to my buddy Google  
> about  
> this and (s)he has pointed me at a number of different web pages that  
> all  
> Hi  
> search for tree table plugin if you are using jquery  
> jquery has treetable plugin  
> and another plugin  
> [http://boagworld.com/development/creating-a-draggable-sitemap-with-jquery](http://boagworld.com/development/creating-a-draggable-sitemap-with-jquery)
