I need to create a 'Reply' button that shows a form for any item in a feed. In other words, it can't be showing/hiding something with a unique div id, because it has to work for any of a (potentially) infinite number of items.
If I use code like this:
<% @questions.each do |question| %>
<%= question.content %>
<a href="" onclick="showStuff('reply'); return false;">Reply</a>
<div id="reply">
<% form_for @reply do |f| %>
<%= f.text_field :message %>
<%= f.submit "Add", :class => "button" %>
<% end %>
</div>
<% end %>
then the form only opens for the first item in the feed.
I don't know Javascript at all and not much JQuery, but if someone wants to take me through this step-by-step, I'd really appreciate it. Thanks.