Jquery only works on the first element of forloop?


Here is my Django template:

{% for feed in feeds %}
    <div id="feed"><b>At {{feed.location}}:<b> {{feed.msg}}</b></div></br>
    <button id="bb{{feed.id}}">Add Comment</button>
    <div id="commentbox" style="display:none;">
      <form method="post" action="/comment/{{feed.id}}/">
        <input type="submit" value="comment" />

{% endfor %}

Jquery code is here:

    $(function() {

          $("#bb.").click(function () {


But here only the first div toggles inside the for loop. Jquery does not work for the remaining for loop elements. Can you please give me the proper jQuery code. Thanks.

make this change:

<button class="bb" id="bb{{feed.id}}">Add Comment</button>
<div class="commentbox" style="display:none;">

and this one:

$(document).ready(function() {
    $(this).click(function () {

Update: And here is a working demo.