JSFiddle - React, Tailwind, and code Playground
HTML
<h2>Remove HTML Element on Click</h2>
<table class="shop_table cart" cellspacing="0">
<thead>
<tr>
<th class="product-remove"> </th>
<th class="product-thumbnail"> </th>
<th class="product-name">Product</th>
<th class="product-price">Price</th>
<th class="product-quantity">Quantity</th>
<th class="product-subtotal">Total</th>
</tr>
</thead>
<tbody>
<tr class="cart_item">
<td class="product-remove">
<span class="gtm4wp_productdata" data-product_id="399" data-product_name="External - 'L' Plates" data-product_price="19.95" data-product_cat="Western Australia" data-product_url="http://platemate.net.au/cart/"></span><a href="#?remove_item=352fe25daf686bdb4edca223c921acea&_wpnonce=9381b58475" class="remove" title="Remove this item">×</a> </td>
<td class="product-thumbnail">
<a href="http://platemate.net.au/product/au-l-plate-ext/"><img width="90" height="90" src="http://platemate.net.au/wp-content/uploads/2015/03/L-external-01-90x90.jpg" class="attachment-shop_thumbnail wp-post-image" alt="L-external-01"></a> </td>
<td class="product-name">
<a href="http://platemate.net.au/product/au-l-plate-ext/">External - 'L' Plates</a> </td>
<td class="product-price">
<input class="amount" value="19.95"> </td>
<td class="product-quantity">
<div class="quantity buttons_added"><input type="button" value="-" class="minus"><input type="number" step="1" min="0" name="cart[352fe25daf686bdb4edca223c921acea][qty]" value="2" title="Qty" class="input-text qty text" size="4"><input type="button" value="+" class="plus"></div> </td>
<td class="product-subtotal">
<input class="amount" value="39.90" /> </td>
</tr>
<tr class="cart_item">
<td class="product-remove">
<span class="gtm4wp_productdata" data-product_id="400" data-product_name="Internal - 'L' Plates" data-product_price="19.95" data-product_cat="Western Australia"...
CSS
.remove{ background-color:#d00; color:#fff; display:inline-block; padding:10px;}
JavaScript
$(".remove").click(function(){
$( this ).parents("tr").remove();
});
$( "input[type='number']" ).change(function() {
var price = $( this ).parents("tr").find(".product-price .amount").val();
var qty = $( this ).val();
var total = price * qty;
$( this ).attr("value", qty);
// alert (total);
parseFloat($( this ).parents("tr").find(".product-subtotal .amount").val(total), 2);
});