Perfect, exactly what I needed. Thanks! Dino On Aug 13, 8:08 am, Johan Arensman <johanm...@gmail.com> wrote: > Sorry, forgot to add 'px' to the value: > > var layout = $('myelement').getLayout(); > $('myelement').setStyle({left: layout.get('left')+10+'px'}); > > On Fri, Aug 13, 2010 at 2:08 PM, Johan Arensman <johanm...@gmail.com> wrote: > > Setting styles can be done using setStyle(); > > > var layout = $('myelement').getLayout(); > > $('myelement').setStyle({left: layout.get('left')+10}); > > > Is this what you're looking for? > > > Greets, > > Johan > > > On Fri, Aug 13, 2010 at 12:48 PM, dinoD <kapau...@gmail.com> wrote: > > >> I'm fooling around with Element.Layout and it seems to be read only. > >> I cannot figure out how to move the position of an element. If I do: > > >> layout = $('myelement').getLayout(); > >> layout['left] = layout.get('left') + 10; > > >> nothing happens. Is Element.Layout indeed read only, or is there a > >> way to set values? > > >> If not, how else besides using Element.Layout can I update the > >> position of an element? > > >> Thanks for any help, > >> Dino > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Prototype & script.aculo.us" group. > >> To post to this group, send email to > >> prototype-scriptacul...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.