# AJAX effect when inserting new div

**URL:** <https://www.ruby-forum.com/t/ajax-effect-when-inserting-new-div/57946>\
**Category:** Rails\
**Created:** [April 17, 2006, 12:13am UTC](https://www.ruby-forum.com/t/ajax-effect-when-inserting-new-div/57946 "2006-04-17T00:13:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d6veteran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@d6veteran](https://www.ruby-forum.com/u/d6veteran)\
**Post date:** [April 17, 2006, 12:13am UTC](https://www.ruby-forum.com/t/ajax-effect-when-inserting-new-div/57946/1 "2006-04-17T00:13:24Z")

</div>

Can some one point me in the right direction?

I’ve got several pages that will respond to user input by creating a new  
div in the content area. I want that new div to visually expand into  
view or flash with a background color rather than just appear.

Thanks.

---

<div class="post-metadata">

**Author:** ![d6veteran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@d6veteran](https://www.ruby-forum.com/u/d6veteran)\
**Post date:** [April 17, 2006, 12:24am UTC](https://www.ruby-forum.com/t/ajax-effect-when-inserting-new-div/57946/2 "2006-04-17T00:24:25Z")

</div>

Arch S. wrote:

> Can some one point me in the right direction?
> 
> I’ve got several pages that will respond to user input by creating a new  
> div in the content area. I want that new div to visually expand into  
> view or flash with a background color rather than just appear.
> 
> Thanks.

I entered “RJS tutorial” into Google and got a few hits:

[http://blog.fearoffish.com/articles/2006/03/04/tutorial-rails-rjs-templates](http://blog.fearoffish.com/articles/2006/03/04/tutorial-rails-rjs-templates)

Among others.

Jeff

---

<div class="post-metadata">

**Author:** ![d6veteran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/94ad74/32.png) [@d6veteran](https://www.ruby-forum.com/u/d6veteran)\
**Post date:** [April 17, 2006, 12:31am UTC](https://www.ruby-forum.com/t/ajax-effect-when-inserting-new-div/57946/3 "2006-04-17T00:31:32Z")

</div>

Jeff C.man wrote:

> Arch S. wrote:
> 
> > Can some one point me in the right direction?
> > 
> > I’ve got several pages that will respond to user input by creating a new  
> > div in the content area. I want that new div to visually expand into  
> > view or flash with a background color rather than just appear.
> > 
> > Thanks.
> 
> I entered “RJS tutorial” into Google and got a few hits:
> 
> [http://blog.fearoffish.com/articles/2006/03/04/tutorial-rails-rjs-templates](http://blog.fearoffish.com/articles/2006/03/04/tutorial-rails-rjs-templates)
> 
> Among others.
> 
> Jeff

Thanks. I also discovered that the method ‘visual\_effect(name,  
element\_id = false, js\_options = {})’ in the scriptaculous library among  
others.

Took me 1 line of code to implement after that. Sweet.
