• I am able to do calculations for the first fields, but the subsequent ones do not work. I wonder if anyone can point me to some direction.

    my code:

    jQuery (function ($) {
    var $qty = $(‘.iqty’),
    $total = $(‘#item-total’);

    $qty.on(‘input’, function(e) {
    var final_value = 1;
    $qty.each(function() {
    var value = $(this).val();
    if (!isNaN(value) && value > 0) final_value += parseInt(value);
    });
    $ttl.val(final_value);
    })
    });`

  • The topic ‘repeated fields calculations’ is closed to new replies.