Frederick Cheung wrote:
> Have you tried using page.select ? it yields those elements matching
> the selector you pass it.
>
> Fred
Hi Fred,
With this:
>page.select('#comments_list ul').each do |el|
> el.hide
>end
I can hide the element.
BUT, if I put "page.insert_html :bottom, el, :partial =>
"comments/comment_list", :object => @comment" inside the structure it
does not work. It generate a JS code like:
> Element.insert("#<ActionView::Helpers::JavaScriptVariableProxy:0x7f97a1c5eb18>"...
So the JS can't find the element.
I thank you for your help. But I think I will just put an id to the ul
element and solve the problem. RJS and prototype is difficult and poorly
documented, I can't understand the true advantage behind rjs and pro.
Best regards,
David Sousa
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---