Hey there,
(First steps in Ruby and Rails...)
I'm trying to make a fieldset collapsible, like they are, for example,
on many Drupal pages.
What I've figuared out is the following:
<fieldset id="addressdata" class="collapsible collapsed">
<legend>
<%= link_to_function("Show/Hide Addressdata") { |page| page[:
addressdata].toggleClassName('collapsed') } %>
</legend>
... some forms etc. here ...
</fieldset>
In CSS, I do a display:none for the class '.collapsed', but
display:block for '.collapsed legend'.
So this is working. But it doesn't look very well. I'd like some
eyecandy, like a fade-in/out or scroll-up/down and a nice arrow which
indicates, that this is sth. collapsed or collapsible. Also, it would be
nice to have the linktext "Show" if the fieldset is hidden and vice
versa.
I surfed the web a lot and found out about script.aculo.us and
prototype, but I just couldn't bring it all together. Is there a simple
tutorial or example for this? Or does anybody of you have a few lines of
code as an example for me?
Thanks in advance,
Julian
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---