I'm trying to make a dynamic calculator for a table

And for this table I have:

```
 <button type="button" class="btn btn-primary">Enviar Pedido 00.00 $</button>

```

What I'm trying to achieve is , when user writes something in a input , the value searches for the price and multiplies it. And that sum gets added to the button.

So if I would write 2 in the #item1 , I would have 5 dollars in the Enviar Pedido.

What I did so far:

```
$('input#item1').keypress(function() {
  alert('a');
});

```

I'm really struggling and all I could find out is to use the keypress for any modification in the input. It doesn't seem right though to do this for all 8 inputs + I'm not sure how to search in the parent for the "Valor" value. 

<https://jsfiddle.net/a7u1y8bc/1/>

```js
$('input#item1').keypress(function() {
  alert('a');
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<table class="table">
  <thead class="thead-light">
    <tr>
      <th scope="col">Item</th>
      <th scope="col">Valor</th>
      <th scope="col">Quantidade</th>
  </thead>
  <tbody>
    <tr>
      <td>Batata Inglesa (500g)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item1" name="item1" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Beterraba (500g)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item2" name="item2" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Cenoura (500g)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item3" name="item3" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Alface Crespa (1 un)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item4" name="item4" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Alface Lisa (1 un)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item5" name="item5" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Brócolis (1 maço)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item6" name="item6" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Hortelã (1 maço)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item7" name="item7" step="1" min="0" max="10"></td>
    </tr>

    <tr>
      <td>Limão Cravo (500g)</td>
      <td>R$ 2,50</td>
      <td><input type="number" id="item8" name="item8" step="1" min="0" max="10"></td>
    </tr>

  </tbody>
</table>

<button type="button" class="btn btn-primary">Enviar Pedido 0.00</button>
```