$(".show_list_price").hover(function () {
$(this).closest("td").find(".amount_prices").show();
}, function () {
$(this).closest("td").find(".amount_prices").hide();
});
鼠标移到单价上,显示阶梯价格:
但对于新插入的行,这个事件就失效了,解决办法是:
$("body").on("mouseenter", ".show_list_price", function() {
$(this).closest("td").find(".amount_prices").show();
});
$("body").on("mouseleave", ".show_list_price", function() {
$(this).closest("td").find(".amount_prices").hide();
});