Может ли кто-нибудь помочь мне в том, как проходить через мою таблицу и суммировать значение количества * цены для каждой строки? Вот мой стол:Как перебирать значения таблиц и сумм jquery
<table id="template_item_table" class="table table-striped">
<thead>
<tr>
<th>Product Code</th>
<th>Unit Price ($)</th>
<th>Quantity</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>12345</td>
<td>50</td>
<td><input type="text" class="form-control quantity" name="quantity"></td>
<td><button class="btn btn-primary"><a href="/product/{{product_code}}">Item Details</a></button></td>
<td><button class="btn btn-danger">Remove Item</button></td>
</tr>
<tr>
<td>2222</td>
<td>53</td>
<td><input type="text" class="form-control quantity" name="quantity"></td>
<td><button class="btn btn-primary"><a href="/product/{{product_code}}">Item Details</a></button></td>
<td><button class="btn btn-danger">Remove Item</button></td>
</tr>
</tbody>
</table>
Я получил, насколько:
$("#template_item_table tr").each(function() {
});
Но я не уверен, как поступить ...