search for the jrails libraries, they contain jquery it has very simple
methods to do what you need.

/script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails


Once you have that installed yo do

<div class="fxBox"><div style="display: block;" class="fx"
onclick="$(this).slideUp()"><p>SlideUp</p></div></div>

that is to slide up
to slide down
<div class="fxBox"><div style="" class="fx"
onclick="$(this).slideDown()"><p>SlideDown</p></div></div>

ve done a few ajax sites but I've never managed to get effects to work
> properly so I've decided to ask here.
>
> I've got a div, which on load, contains a title and a 'View' link. When
> the link is clicked, the div's content is replaced by a table with more
> info.
>
> How do I go about putting effects in so it does something like this:
>
> * Click the link
> * Div slides up so it's invisible
> * The action returns the new div content
> * Div slides back down to the new height with the new content
>
> And the reverse for when the user clicks the 'Hide' link that is added.
>
> I was using visual_effect(:slide_up, 'myDiv') but that made the div
> disappear after it slid back down again.
>
> Can someone with knowledge of effects clue me in please?
>
> Thanks
>
> Matt
>
> >
>


-- 
Felipe Vergara Contesse
IngenierĂ­a Civil Industrial UC

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to