rubyonrailsin

A Ruby and Rails talk

Sunday, March 28, 2010


Re: [Rails] Re: toggle appear starts hidden ?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

i never tried that, but i think you could iterate the elements with the class name like:


$$('.clazz').each(function(e) {
  e.toggle();
})

or else, you could write your own function, for example:
function toggle_all() {
  toggle1();
  toggle2();
  ..
}

function toggle1() {
  ...
}

function toggle2() {
  ...
}


On Mon, Mar 29, 2010 at 2:15 PM, Dudebot <craignied@gmail.com> wrote:
On Mar 28, 11:10 pm, Yong Gu <zerogy...@gmail.com> wrote:
> try <div id="toggle_appear" style="display:none;"> yada yada yada </div>

Thanks, Yong!

One other question: is it possible to have multiple divs toggling on/
off at the same time?  I tried changing "id" to "class", and then it
simply wouldn't toggle.

Many TIA again,
Craig

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive