Hi Please tell me how to achieve the below. I am trying to manipulate multiple dom elements simulatenously , for eg: adding class names to multiple dom elements $("id1","id2","id3").invoke(addClassName(''someclassname''); ?? $$(''div'').invoke(removeClassName(''somestyle'')); ?? With invoke we may use dom extended methods that don;t need arguments like hide, show. But how to use extended methods like addClassName, removeClassName and many more as these needs arguments. Thank you in advance. Velan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Take a look at documentation [1]. It explains how to do exactly what you need. [1] http://www.prototypejs.org/api/enumerable/invoke On Feb 23, 6:20 am, sl_sub <hive...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > Please tell me how to achieve the below. I am trying to manipulate > multiple dom elements simulatenously , for eg: adding class names to > multiple dom elements > > $("id1","id2","id3").invoke(addClassName(''someclassname''); ?? > $$(''div'').invoke(removeClassName(''somestyle'')); ?? > > With invoke we may use dom extended methods that don;t need arguments > like hide, show. But how to use extended methods like addClassName, > removeClassName and many more as these needs arguments. > > Thank you in advance. > Velan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yes, documentation explains that. Thank you for the help. Best wishes Velan On Feb 23, 6:36 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Take a look at documentation [1]. It explains how to do exactly what > you need. > > [1]http://www.prototypejs.org/api/enumerable/invoke > > On Feb 23, 6:20 am, sl_sub <hive...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi > > > Please tell me how to achieve the below. I am trying to manipulate > > multiple dom elements simulatenously , for eg: adding class names to > > multiple dom elements > > > $("id1","id2","id3").invoke(addClassName(''someclassname''); ?? > > $$(''div'').invoke(removeClassName(''somestyle'')); ?? > > > With invoke we may use dom extended methods that don;t need arguments > > like hide, show. But how to use extended methods like addClassName, > > removeClassName and many more as these needs arguments. > > > Thank you in advance. > > Velan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---