I have a Django HTML file like this:
<button type="button" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" class="btn btn-primary form-control">{{ choice.choice_text }}</button>
I have an Ajax .js file like this:
$(document).ready(function(){
$('#choice{{ forloop.counter }}').on('click', function(){
(...)
Where {{ forloop.counter }} obviously don't work.
What I could use to replace it in ajax?
Thank you