Well, I''m a web designer\developer that following Standards. So I''m updating my knowledge and interface design capabilities of 2.0 using degradable javascript via script.aculo.us. In this way, I prefer to not insert direcly inline js code on (X)HTML page. So in most cases I may apply an effect to a series, or array, of elements with the same classes (think a photogallery). An example to explain it. So I would like to make a photogallery like these: <div id="mygallery"> <a href="..."...><img class="photogallery" alt="Photo 1" ... /></a> <a href="..."...><img class="photogallery" alt="Photo 2"... /></a> <a href="..."...><img class="photogallery" alt="Photo 3"... /></a> <a href="..."...><img class="photogallery" alt="Photo 4" ... /></a> </div> In which when images loads its opacity is set to 50% and on hover or focus gain the Effect.Appear to gain full 100% opacity. On my logic, but I''m not an expert js coder and may be in a wrong way, I would like to use Event.Observer (from prototype) to apply opacity effect on all images when page loads and to append (but in which way??? - help!!! :-) So there are a Event.Observer using class (like CSS) to apply an Effect like Appear or there are another way? Thanks for support, Simone --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Simone Onofri wrote:> On my logic, but I''m not an expert js coder and may be in a wrong way, > I would like to use Event.Observer (from prototype) to apply opacity > effect on all images when page loads and to append (but in which > way??? - help!!! :-) > > So there are a Event.Observer using class (like CSS) to apply an > Effect like Appear or there are another way?I do this kind of thing with behaviour.js http://bennolan.com/behaviour/ -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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 do this kind of thing with behaviour.js > http://bennolan.com/behaviour/Thanks Michael for help! It''s exatly what I''m searching. Bye, Simone --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
the $$ prototype selector won''t do what you''re looking for? $$(''#mygallery img.photogallery'').each( ... ) On 11/14/06, Simone Onofri <simone.onofri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > I do this kind of thing with behaviour.js > > http://bennolan.com/behaviour/ > > Thanks Michael for help! It''s exatly what I''m searching. > > Bye, > > Simone > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Simone Onofri wrote:> Well, > I''m a web designer\developer that following Standards. So I''m updating > my knowledge and interface design capabilities of 2.0 using degradable > javascript via script.aculo.us. In this way, I prefer to not insert > direcly inline js code on (X)HTML page. > > So in most cases I may apply an effect to a series, or array, of > elements with the same classes (think a photogallery). An example to > explain it. > > So I would like to make a photogallery like these: > > <div id="mygallery"> > <a href="..."...><img class="photogallery" alt="Photo 1" ... /></a> > <a href="..."...><img class="photogallery" alt="Photo 2"... /></a> > <a href="..."...><img class="photogallery" alt="Photo 3"... /></a> > <a href="..."...><img class="photogallery" alt="Photo 4" ... /></a> > </div> > > In which when images loads its opacity is set to 50% and on hover or > focus gain the Effect.Appear to gain full 100% opacity. > > On my logic, but I''m not an expert js coder and may be in a wrong way,Yes, it is. Use CSS opacity and the a:hover pseudo class. No script required and degrades without fuss. <URL: http://www.quirksmode.org/css/opacity.html > When enough users are using IE 7, you''ll be able to use :hover on most elements and IE users will see it too.> I would like to use Event.Observer (from prototype) to apply opacity > effect on all images when page loads and to append (but in which > way??? - help!!! :-)If you use CSS, you don''t have to wait for onload, it is applied from the moment the stylesheet is loaded. Since that must be in the head, it is before any images. You can get lots of help on CSS at: news:http://groups.google.com.au/group/comp.infosystems.www.authoring.stylesheets <URL: http://groups.google.com.au/group/comp.infosystems.www.authoring.stylesheets>-- Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---