Sorry still stuck. If you look at the attached _subcomment.html.erb you
will see that I have put the jQuery inside the each loop and it
obviously causes problems because the jQuery is repeated. It's inside
because I get an error on the comment variable otherwise.
Any ideas
Neil
Attachments:
On Aug 2, 12:22 pm, Neil Bye li...@ruby-forum.com wrote:
Neil Bye wrote in post #998024:
Jeffrey L. Taylor wrote in post #997862:
div id=%= remark_#{comment[:id]} %
I rebuilt the app in Rail 3 and the above no longer works. Has anybody
an idea why? Or What can I use instead?
How has
Frederick Cheung wrote in post #1014673:
On Aug 2, 12:22pm, Neil Bye li...@ruby-forum.com wrote:
Neil Bye wrote in post #998024:
Jeffrey L. Taylor wrote in post #997862:
div id=%= remark_#{comment[:id]} %
I rebuilt the app in Rail 3 and the above no longer works. Has anybody
an idea why?
Sorry the attachment is now correct, Id missed out the _#{comment[:id]}
Neil
Attachments:
http://www.ruby-forum.com/attachment/6495/_subcomment.html.erb
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
On Aug 3, 11:30 am, Neil Bye li...@ruby-forum.com wrote:
Sorry the attachment is now correct, Id missed out the _#{comment[:id]}
it's not in a %= tag anymore
Fred
Neil
Attachments:http://www.ruby-forum.com/attachment/6495/_subcomment.html.erb
--
Posted viahttp://www.ruby-forum.com/.
The subcomments on the first comments subcomments
the subcomments on the first comment and has no effect on it's own
subcomments
lol :)
In jquery there is nice method toggle.
.toggle( showOrHide )
showOrHideA Boolean indicating whether to show or hide the elements.
With no parameters, the
Eugen Ciur wrote in post #997765:
http://api.jquery.com/toggle/
use it, it will simplify you code and maybe you'll find out solution on
your own.
Never used jquery before, I see it's simplicity compared to straight js
I now have
% @user.comments.each do |comment| %
div id=remark p%=
Frederick Cheung wrote in post #997768:
Is this repeated for each comment? have multiple things on the page
with the same id is a no-no: ids should be unique
Fred
This is the full code
% @user.comments.each do |comment| %
div id=remark p%= comment.body %/p
div id=commenterp%=
On 10 May 2011, at 17:56, Neil Bye li...@ruby-forum.com wrote:
Frederick Cheung wrote in post #997768:
Is this repeated for each comment? have multiple things on the page
with the same id is a no-no: ids should be unique
Fred
This is the full code
% @user.comments.each do
On 10 May 2011 17:56, Neil Bye li...@ruby-forum.com wrote:
Frederick Cheung wrote in post #997768:
Is this repeated for each comment? have multiple things on the page
with the same id is a no-no: ids should be unique
Fred
This is the full code
% @user.comments.each do |comment| %
div
Quoting Colin Law clan...@googlemail.com:
On 10 May 2011 17:56, Neil Bye li...@ruby-forum.com wrote:
Frederick Cheung wrote in post #997768:
Is this repeated for each comment? have multiple things on the page
with the same id is a no-no: ids should be unique
Fred
This is the
11 matches
Mail list logo