I want to change the sum price when I change the quantity. This is view:
@foreach (var item in Model)
{
<tr>
<td>@item.Product.Name</td>
<td><input type="number" value="@item.Count" id="Count" /></td>
<td id="Price">@item.Product.Price</td>
<td id="SumPrice">@item.SumPrice</td>
</tr>
}
This is the java script that I used but it doesn't work. When I change the quantity the sum price doesn't change.
$('#Count').on('keyup',function(){
var tot = $('#Price').val() * this.value;
$('#SumPrice').val(tot);
});