hi all; i tried a simple thing and searched the group, but w/o success. and the problems seems to be lame. i want a hidden DIV to appear (fade in) when i click another DIV. all scriptaculous effects work fine if the target DIV is visible. once I apply the "display: hidden" CSS attribute, the DIV remians hidden. so i guess there must be another way to hide it before it can be made visible by scriptaculous. any help would be appreciated. thanks in davance. a --~--~---------~--~----~------------~-------~--~----~ 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 Jul 25, 2007, at 7:23 AM, cell wrote:> > hi all; > > i tried a simple thing and searched the group, but w/o success. and > the problems seems to be lame. > i want a hidden DIV to appear (fade in) when i click another DIV. all > scriptaculous effects work fine if the target DIV is visible. once I > apply the "display: hidden" CSS attribute, the DIV remians hidden. > so i guess there must be another way to hide it before it can be made > visible by scriptaculous. > > any help would be appreciated. > thanks in davance. > >How exactly are you hiding the item? If you are using external CSS to do this, then you have to change that. Try using inline style declaration on the element itself. Another thing to do is to set the visibility on page load. This may mean a flash of visible content if your page is large, but it also fixes the problem of No Script = Can''t See It. Event.observe(window,''load'',function(){ $(''myDooDad'').hide(); }); Walter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Effect.Appear should work with "display:none" just fine $(''anotherDiv'').observe(''click'', function(){ Effect.Appear(''targetDiv'') }) -- View this message in context: http://www.nabble.com/scriptaculous%3A-fade-in-in-a-hidden-element-tf4141527.html#a11782992 Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK guys. Thanks for the responses. You''re both right. The effect works fine if the CSS "display: none" is applied, BUT ONLY if it''s applied inline. Not in the external style sheet. Cool. Thanks! On 25 Lip, 15:47, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Effect.Appear should work with "display:none" just fine > > $(''anotherDiv'').observe(''click'', function(){ > Effect.Appear(''targetDiv'')}) > > -- > View this message in context:http://www.nabble.com/scriptaculous%3A-fade-in-in-a-hidden-element-tf... > Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I know you can modify stylesheet rules, I wonder whether a modification could be made to ''show'' to check for the existence of a stylesheet display:none rule based on the class(es) assigned to the element and remove it if it exists? I guess then you''d have the problem of block vs inline but I expect that just removing the attribute would suffice.. it would be up to the programmer to not use the class on any other elements. I dont really have a problem with inline style, it just makes your markup rather messy.. and I get the flicker problem on a few of my pages. I dont see this as something that should be part of prototype but maybe as an overridden show function.. Gareth On 7/26/07, cell <cellulit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > OK guys. Thanks for the responses. You''re both right. > The effect works fine if the CSS "display: none" is applied, BUT ONLY > if it''s applied inline. Not in the external style sheet. > > Cool. Thanks! > > On 25 Lip, 15:47, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Effect.Appear should work with "display:none" just fine > > > > $(''anotherDiv'').observe(''click'', function(){ > > Effect.Appear(''targetDiv'')}) > > > > -- > > View this message in context: > http://www.nabble.com/scriptaculous%3A-fade-in-in-a-hidden-element-tf... > > Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---