jquerry in rails
- by Matthias Günther
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.