Jade - why only the first button in a loop is working
<p>In a jade view template, there is a button created in a loop. The button call a function (in a public .js lib) and parameters are sent.
In the loop there are n items, n buttons but there is only one action when the first one is clicked.</p>

<pre><code>each game in games
   td= moment(game.game.date).format('YYYY-MM-DD h:mm:ss a')
   if (game.game.users.white==user.key)
      td= game.game.users.black
   else
      td= game.game.users.white
      td= game.game.id
      td
           input#username(type="hidden", value="#{user.key}", name="username")
           input#rgame(type="hidden", value="#{game.game.id}", name="rgame")
           button#resumegame Play
</code></pre>