# More visual effect questions?

**URL:** <https://www.ruby-forum.com/t/more-visual-effect-questions/125299>\
**Category:** Rails\
**Created:** [January 8, 2008, 1:57am UTC](https://www.ruby-forum.com/t/more-visual-effect-questions/125299 "2008-01-08T01:57:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [January 8, 2008, 1:57am UTC](https://www.ruby-forum.com/t/more-visual-effect-questions/125299/1 "2008-01-08T01:57:45Z")

</div>

I have my divs fading and appearing… BUT!! they all fade the first  
time even if they are checked… guess that is because im using  
toggle…

\<%= f.check\_box :monday, :onclick =\> visual\_effect(:toggle\_appear,  
‘mondaydiv’) %\>

so I would guess that I have to write some RJS to fade all the div’s  
if the associated checkboxs is unchecked when the page first loads.

anyone either point me to a doc that explains this or tell me a better  
way of doing this!!

thanks!!

---

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [January 8, 2008, 2:00am UTC](https://www.ruby-forum.com/t/more-visual-effect-questions/125299/2 "2008-01-08T02:00:41Z")

</div>

Or you could just hide the divs that should be hidden by specifying  
style=‘display:none’ on them…

\>

On Jan 8, 2008 11:27 AM, spokra [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> anyone either point me to a doc that explains this or tell me a better  
> way of doing this!!
> 
> thanks!!
> 
> >

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.

---

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [January 8, 2008, 2:12am UTC](https://www.ruby-forum.com/t/more-visual-effect-questions/125299/3 "2008-01-08T02:12:59Z")

</div>

I follow what your saying… BUT :\> remember I’m a newbie…

in my case would that be monday.field == false?

how do i refer to which checkbox i want to use?

---

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [January 8, 2008, 2:34am UTC](https://www.ruby-forum.com/t/more-visual-effect-questions/125299/4 "2008-01-08T02:34:02Z")

</div>

No, I’m guessnig your form’s checkboxes are checked/uncheked depending  
on a  
boolean variable somewhere. So use this variable to determine the  
visible/invisible state of your divs.

On Jan 8, 2008 11:41 AM, spokra [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > style=‘display:none’ on them…
> > 
> > - Show quoted text -

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.
