I know how to replace an inner html element , using page.replace_html ''myElement'', :partial => ''myPartial'' How to change the class value of an html element in my .rjs file using a prototype.js function removeClassName(''myElment'', ''anOldClassName'') or addClassName(''myElement'', ''aNewClassName'') thanks fyh kad -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kad Kerforn wrote:> I know how to replace an inner html element , using > > page.replace_html ''myElement'', :partial => ''myPartial'' > > How to change the class value of an html element in my .rjs file > using a prototype.js function > > removeClassName(''myElment'', ''anOldClassName'') > or > addClassName(''myElement'', ''aNewClassName'') > > thanks fyh > > kadreply to myself (may help future searches...) page[''myElement''].removeClassName(''anOldClassName'') page[''myElement''].addClassName(''aNewClassName'') -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---