I have a table and has rows that have an addtocart button per row/item
$( $table ).delegate(".Addtocart", "click", function() {
var itemNo = $(this).closest('tr').find('td.itemNo').html();
var selected_item = $(this).closest('tr').find('td.itemdescr').html();
var remaining_qty = $(this).closest('tr').find('td.currqty').html();
var unitPrice = $(this).closest('tr').find('td.unit_price').html();
var amount = $(this).closest('tr').find('td.Amount').html();
$("#action").val('add');
$('#itemNo').val(itemNo);
$('#selected_item').val($.trim(selected_item));
$('#remaining_qty').val(remaining_qty);
$('#unitPrice').val(unitPrice);
$('#amount').val(amount);
$('#myModal').modal('show');
});
I want to disable that button on that item after i added it on my Cart List
for example:
Vinegar Addtocart
Sugar Addtocart
Salt Addtocart
Now I want to add vinegar in my cart list. After I added the vinegar, the addtocart button on that vinegar has been disabled. How? Thank you