Hi i''m learning prototype and i need to know something... Someone knows how to write and get the value of some atribute... i mean like...jquery that uses $(''#sub-div'').atrr(''alt'',''visible); in prototype is there something like that?... I hope you can help me and thanks :D --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi i''m learning prototype and i need to know something... Someone knows how to write and get the value of some atribute... i mean like...jquery that uses $(''#sub-div'').atrr(''alt'',''visible); in prototype is there something like that?... I hope you can help me and thanks :D --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Zell 写道:> Hi i''m learning prototype and i need to know something... > > > Someone knows how to write and get the value of some atribute... i > mean like...jquery that uses $(''#sub-div'').atrr(''alt'',''visible); > > in prototype is there something like that?... > > I hope you can help me and thanks :D > > > >Get some element: id=''sub-div'' => $(''sub-div'') class=''test'' => $$(''.test'')[0] get attribute => $(''sub-div'').readAttribute(''attr'') set attribute => $(''sub-div'').setAttribute(''attr'', ''test'') --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Zell, Welcome! Hope you find Prototype useful. The best thing you can do when learning Prototype, in my view, is spend an hour or two reading the API docs. [1] Prototype''s API isn''t so big that you can''t read the entire thing all the way through, and doing that will save you a LOT of time in the long run. [1] http://www.prototypejs.org/api Hope this helps, -- T.J. Crowder tj / crowder software / com On Jul 5, 5:52 am, Zell <zel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi i''m learning prototype and i need to know something... > > Someone knows how to write and get the value of some atribute... i > mean like...jquery that uses $(''#sub-div'').atrr(''alt'',''visible); > > in prototype is there something like that?... > > I hope you can help me and thanks :D--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---