[Solved] jQuery – update variable when input values changed

[ad_1]

With a few tweaks to the JS and HTML, the following code works…

$('body').on('keyup', '.qty_field', function () {
var sum = 0;
$('.qty_field').each(function() {
    sum += Number($(this).val());
});

    $('.running_total').html(sum);
});

[ad_2]

solved jQuery – update variable when input values changed