My HTML structure:

```
<div class="pricesection">
        <label id="productPrice">
        <strong>
        <span id="totalprice"> 129,00</span>
        <span>$</span>
        </strong>
        </label>
        <input type="text" value="1" name="am" id="quantity">
        <button class="submitbtn" type="submit">add to Cart</button>
</div>

```

My JS code:

```
$('#quantity').keyup(function(){
  $('#quantity').each(function () {  
  var qty = $('#quantity').val();
  var price = $('#totalprice').val();
  var total = price * qty;
  });

  $('#totalprice').html(total);
});

```

I have found many examples, not suitable. :-(

After entering Quantity Item Price will be Automatically Updated. If "0", letter, "empty" or after canceling Original price must be restored.

I always get "0" value ​​Back!

I am very grateful for any help!