I am displaying a list of blog posts in a for loop, each has a comment form with send button underneath it. I need to let Django know which specific post has been clicked on so have added {{post.id}} to the button element's id. How do I then pass this information to jQuery? Is it possible to do something like this?
<button id="addComBtn{{post.id}}...>Send</button>
$('#addComBtn //post.id here').click(function() {
...
});
Or is there a better way?