jquerry in rails

Posted by Matthias Günther on Stack Overflow See other posts from Stack Overflow or by Matthias Günther
Published on 2010-05-20T12:39:24Z Indexed on 2010/05/20 12:40 UTC
Read the original article Hit count: 274

Filed under:
|

I'm iteration over records and want to create the toggle-options for records but I can't replace the div-id with the records:

<% for bill in @bills %> <% tmp = "test"%> <%= link_to '&raquo now','#', :onclick => '$("#{tmp}").toggle();' %>

Instead of getting:

&raquo now

I'm getting:

&raquo now

So he isn't evaluation the ruby variable in the string. How can I do this?

Thanks for your help and I'm new in jquerry.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about jQuery