how to make this code from Jquery to Javascript? [closed]

  javascript, jquery

i’m not used to code with jQuery . I found this code online and it really helped me .
How can I convert it to Javascript ?
Thank you.

$(document).ready(function(){
    update_amounts();
    $('.qty, .price').on('keyup keypress blur change', function(e) {
        update_amounts();
    });
});

function update_amounts(){
    var sum = 0.0;
    $('#myTable > tbody  > tr').each(function() {
        var qty = $(this).find('.qty').val();
        var price = $(this).find('.price').val();
        var amount = (qty*price)
        sum+=amount;
        $(this).find('.amount').text(''+amount);
    });
    $('.total').text(sum);
}

Source: Ask Javascript Questions

LEAVE A COMMENT