Forum: Ruby on Rails rjs toggle blind effect headache

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dave M (Guest)
on 2007-03-03 15:15
(Received via mailing list)
I am trying to write a little rjs template that toggles a div.



I hear you cry, and yes it works, but what I am trying to do is the
equivalent of:

Effect.toggle('div_id', 'blind')

Can anybody tell me have to write this in a rjs template??

Any help great fully received.

Chris H. (Guest)
on 2007-03-03 15:50
(Received via mailing list)
according to:

there is a toggle visual effect of :toggle_blind but it's a
scriptaculous helper, not a prototype helper. so try



page.visual_effect :toggle_blind, 'div_id'

if all else fails 'Effect.toggle', 'div_id', 'blind'

should do the trick.
David M. (Guest)
on 2007-03-03 15:56
(Received via mailing list)
Many thanks, both of these worked:

> page.visual_effect :toggle_blind, 'div_id'
> 'Effect.toggle', 'div_i

This topic is locked and can not be replied to.