underscore.js テンプレート (特に jquery .click() イベント) 内に JavaScript コードを含めるのに問題があります。<% .. %> タグのさまざまなバリエーションを試しましたが、これが私の最新のものです。
<script type="text/html" id="eventTemplate">
<% _.each(words, function(word) { %>
<a data-role="button" id="eventButton <%= word %>" href="#" data-icon="plus" data-iconpos="right">
<%= word %>
</a>
<% $('#eventButton' + word +').click(function() {
console.log(word);
});
}); %>
どんな助けでも大歓迎です。ありがとう