Mam poniższy kod wyciągnięty z pętli, jak można tutaj uwzględnić zależność gdy checkbox jest odznaczony to pomija oznaczony przy nim wiersz w sumowaniu?
http://jsfiddle.net/gmyvtbwL/<table>
<tr>
<td>
<input id="Field_Price_[]" value="1" type="text" />
<input id="Field_Amount_[]" type="text"/>
<input id="Field_Check_[]" type="checkbox" checked="checked"/>
</td>
</tr>
<tr>
<td>
<input id="Field_Price_[]" value="1" type="text"/>
<input id="Field_Amount_[]" type="text"/>
<input id="Field_Check_[]" type="checkbox" checked="checked"/>
</td>
</tr>
<tr>
<td>
<input id="Field_Price_[]" value="1" type="text"/>
<input id="Field_Amount_[]" type="text"/>
<input id="Field_Check_[]" type="checkbox" checked="checked"/>
</td>
</tr>
<table>
<tr>
<td><span id="PrintSum">0.00</span></td>
</tr></table>
<script type="text/javascript">
var $prices = $('input[id^=Field_Price_]'),
$amounts = $('input[id^=Field_Amount_]');
$prices.add($amounts).on('keyup', function() {
var total = 0;
$prices.each(function() { total
+= $
(this
).val
() * $
(this
).next().val
() || 0; });
$('#PrintSum').text(total.toFixed(2));
})
.trigger('keyup');
</script>