Ken Keefe
2007-Mar-07 22:57 UTC
Scriptaculous: How do I load a page with an element already faded...
I want to load a page with a div that''s already faded so that I can make it appear as if from no where... What''s the recommended method for that? Thanks, Ken --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron Roberson
2007-Mar-07 23:13 UTC
Re: Scriptaculous: How do I load a page with an element already faded...
Event.observe(window, ''load'', init, false); function init() { document.getElementById(''myDIV").style.display = ''hidden''; }; Try that... HTH, Aaron On 3/7/07, Ken Keefe <kjkeefe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I want to load a page with a div that''s already faded so that I can > make it appear as if from no where... What''s the recommended method > for that? > > Thanks, > Ken > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron Roberson
2007-Mar-07 23:14 UTC
Re: Scriptaculous: How do I load a page with an element already faded...
Oops... should be something like display = ''none''; -Aaron On 3/7/07, Aaron Roberson <iisitedesign-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Event.observe(window, ''load'', init, false); > > function init() { > document.getElementById(''myDIV").style.display = ''hidden''; > }; > > Try that... > > HTH, > Aaron--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Gareth Evans
2007-Mar-07 23:17 UTC
Re: Scriptaculous: How do I load a page with an element already faded...
You can also put an inline style on the element style="display:none;" Gareth On 3/8/07, Aaron Roberson <iisitedesign-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Oops... should be something like display = ''none''; > > -Aaron > > On 3/7/07, Aaron Roberson <iisitedesign-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Event.observe(window, ''load'', init, false); > > > > function init() { > > document.getElementById(''myDIV").style.display = ''hidden''; > > }; > > > > Try that... > > > > HTH, > > Aaron > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David Dashifen Kees
2007-Mar-07 23:18 UTC
Re: Scriptaculous: How do I load a page with an element already faded...
There might be better options but I tend to set the div''s visibility to hidden, fade it, then set its visibility to visible. It works especially nicely if your "base" CSS style shows the div and you include a different CSS file with javascript to hide it. That way, if javascript isn''t available to a visitor, they''ll still see the div and those with javascript will see the faded div. -- Dash -- Ken Keefe wrote:> I want to load a page with a div that''s already faded so that I can > make it appear as if from no where... What''s the recommended method > for that? > > Thanks, > Ken > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---