From f0409888549fecf931a1978dec5621ccf2938ecd Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Mon, 7 Aug 2017 18:00:34 +0000 Subject: [PATCH] This changes on to one which is a better strategy when it is only necessary for the handler to fire once and empty the results for the membership discount. --- js/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/transaction.js b/js/transaction.js index c24bd64..74c1ff6 100644 --- a/js/transaction.js +++ b/js/transaction.js @@ -829,7 +829,7 @@ $(function() { var exp = obj.expiration_date; expiration_date = new Date(exp.split("-").toString()); if (d >= expiration_date) { - amount.on("input", function () { + amount.one("input", function () { $("#membership_discount").empty(); }); if ($("#expired_membership").length === 1) { @@ -862,7 +862,7 @@ $(function() { } } } else { - amount.on("input", function () { + amount.one("input", function () { $("#membership_discount").empty(); }); if ($("#paid_member").length === 1) {