Update prices per person on key up
After user feedback
This commit is contained in:
parent
ced04acb2e
commit
5a9d9c1d31
1 changed files with 4 additions and 2 deletions
|
@ -119,12 +119,14 @@
|
|||
$(".noscript").css("display", "none");
|
||||
$(".script").css("display", "unset");
|
||||
|
||||
$("#per_dish input").on("change", e => {
|
||||
function updatePerPersonPrices(e) {
|
||||
console.log(e.target);
|
||||
for (let item_id of e.target.dataset.forItems.split(",")) {
|
||||
$("#item_" + item_id).val(e.target.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
$("#per_dish input").on("change", updatePerPersonPrices);
|
||||
$("#per_dish input").on("keyup", updatePerPersonPrices);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue