【发布时间】:2015-08-19 06:21:04
【问题描述】:
我有一张表,每行/项目都有一个添加到购物车按钮
$( $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');
});
在我将它添加到我的购物车列表后,我想禁用该项目上的那个按钮
例如:
醋加入购物车
糖添加到购物车
盐添加到购物车
现在我想在我的购物车列表中添加醋。添加醋后,该醋上的添加到购物车按钮已被禁用。如何?谢谢
【问题讨论】:
标签: javascript php jquery