JSFiddle - React, Tailwind, and code Playground

HTML

<table>
  <tr>
    <td>first</td>
    <td class="price">25</td>
    <td><input type="text" class="quantity"></td>
    <td class="amount></td>
  </tr>
</table>

JavaScript

jQuery(function($) {
$(document).ready(function() {
    // alert('document ready');

    $("input.quantity").live("blur", function() {
        var $this = $(this);

        quantity = parseInt($this.val());
        alert("Quantity : " + quantity);
        price = parseInt($this.parents("tr").find("td.price").text());
        alert("Price : " + price);
        amount = quantity * price;
        alert("Amount : " + amount);
        $this.next("td.amount").html(amount);
    });
  });
});