my idea shpping cart

by Prasad Gavande

HTML

<form id="all">
Qty:
<input type="text" id="#qty">
</br>
Price:
<input type="text" id="#value">
</br>
Total One
<input type="text" id="#totalforone">
<div id="g">0</div>
</form>
</br>
</br>
Qty:
<input type="text" id="#qty">
</br>
Price:
<input type="text" id="#value">
</br>
Total One
<input type="text" id="#totalforone">
</br>
</br>
</br>
</br>
</br>
</br>
total of All:
<input type="text" id="#totalforall ">

JavaScript

$(document).ready(function() {
 /* var a, b, c;
  var x, y, z = 0;
  var p;
  var a = $('#qty').keydown(function() {
    b = 20;
    c = a * b;
    alert(c);
    $('#totalforone').text(a);
    $("#qty,#value").keyup(function () {
    $('#totalforone').val($('#qty').val() * $('#value').val());*/
    
     $('#all').on('keyup', 'input', function() {
        var iSum = 0;
        $('#all input').each( function() {
           iSum = iSum + parseFloat($(this).val());
        });
        $('#g').html(iSum);
});


});