How can I get a dynamic id
from each <tr>
<a>
tag. I'm trying with the code below. Any help would be appreciated.
<td>
<a class="btn" id="product-update{{product.id}}" href="{% url 'accpack:product_update' pk=product.id %}">{{product.product_code}}</a>
</td>
$(document).ready(function () {
$("div[id^='product-update']").click(function () {
$("#collapseTwo").addClass( "show");
});
});