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: 277
ruby-on-rails
|jQuery
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 '» now','#', :onclick => '$("#{tmp}").toggle();' %>
Instead of getting:
» now
I'm getting:
» 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