I have a bunch of small images lined up horizontally in the same div. Currently I have the script working to scale up the images with onmouseover and scale back to orginial size with onmouseout. However, when one image is scaling, it moves the other images within the div to accommodate the increased size. How can I get the other images to stay in place and just have the image that is scaling overlap the other images if necessary? --~--~---------~--~----~------------~-------~--~----~ 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 think you would have to place each image inside it''s on div and onmouseover put that div as absolute and set the z-index to a greater value than the rest. On Dec 12, 2007 3:07 PM, polomasta <bjoyce-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:> > I have a bunch of small images lined up horizontally in the same div. > Currently I have the script working to scale up the images with > onmouseover and scale back to orginial size with onmouseout. However, > when one image is scaling, it moves the other images within the div to > accommodate the increased size. How can I get the other images to stay > in place and just have the image that is scaling overlap the other > images if necessary? > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maybe something like this might work? (untested) $$("#somecontainer img").each(function(image) { image.absolutize().setStyle({ left: image.previousSiblings().invoke("getDimensions").pluck("width").sum() + "px" }); image.observe("mouseover", ...); image.observe("mouseout", ...); }); Best, -Nicolas On Dec 12, 2007 1:51 PM, Antonio CS <antoniocs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think you would have to place each image inside it''s on div and > onmouseover put that div as absolute and set the z-index to a greater value > than the rest. > > > On Dec 12, 2007 3:07 PM, polomasta < bjoyce-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote: > > > > > I have a bunch of small images lined up horizontally in the same div. > > Currently I have the script working to scale up the images with > > onmouseover and scale back to orginial size with onmouseout. However, > > when one image is scaling, it moves the other images within the div to > > accommodate the increased size. How can I get the other images to stay > > in place and just have the image that is scaling overlap the other > > images if necessary? > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thanks for the suggestions... I will try it out. now am I having a problem with scaleFromCenter not functioning.. the scaling looks the same regardless if I have that option set to true or not. It appears as if the image is scaling to the right and down from the top left corner. I need to scale it out equally from the center.. here is my code: function scaleUp(elementId) { new Effect.Scale(elementId, 125,{ duration: .25, scaleFromCenter: true, scaleMode: { originalWidth: 50, originalHeight: 50 }, queue: { scope: ''catscope'', limit: 2 } }); }; --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
tvielmetter-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Dec-13 23:02 UTC
Re: Effect.Scale question
sorry i dont have a answer for you, but i am looking for the exact thing that you seemed to get to work. i want several text elements aligned in one row to be scaled bigger onmouseover and to be scaled back onmouseout, but they always grow randomly in all kinds of ways. have started a thread about this: http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/edb049740eccb7ff#7b2b2d47202c3f94 probably you could tell me how to do this? thanks a million! best tobias On Dec 12, 4:07 pm, polomasta <bjo...-PGNGAmqIy5icqzYg7KEe8g@public.gmane.org> wrote:> I have a bunch of small images lined up horizontally in the same div. > Currently I have the script working to scale up the images with > onmouseover and scale back to orginial size with onmouseout. However, > when one image is scaling, it moves the other images within the div to > accommodate the increased size. How can I get the other images to stay > in place and just have the image that is scaling overlap the other > images if necessary?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---