Hello! I would like to use the toggle effect (http://github.com/madrobby/ scriptaculous/wikis/effect-toggle). But I would like to have by default the text hidden in place of visible. Is it possible? Thanks, Derfel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 19.5.2008, at 11.56, Derfel wrote:> Hello! > > I would like to use the toggle effect (http://github.com/madrobby/ > scriptaculous/wikis/effect-toggle). But I would like to have by > default the text hidden in place of visible. Is it possible?Yes. Use "display: none" as an inline (as in, not in an external stylesheet, it won''t work) style for the element: <div style="display: none;">Some text to be hidden</div> or (better for accessibiity reasons in some cases) hide it on page load: <div id="tobehidden">Some text to be hidden</div> document.observe(”contentloaded”, function() { $ (''tobehidden'').hide(); }) //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi