mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-14 18:36:20 +01:00
Add bag.js
This commit is contained in:
parent
c703a77b65
commit
26c125afc5
1 changed files with 19 additions and 0 deletions
19
public/js/bag.js
Normal file
19
public/js/bag.js
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
function add(id) {
|
||||||
|
var inputCount = document.getElementById(id);
|
||||||
|
console.log("I got clicked");
|
||||||
|
if (inputCount.value < 9) {
|
||||||
|
inputCount.value++;
|
||||||
|
} else {
|
||||||
|
alert("MAX product reach");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function minus(id) {
|
||||||
|
var inputCount = document.getElementById(id);
|
||||||
|
console.log("Minus got clicked");
|
||||||
|
if (inputCount.value > 1) {
|
||||||
|
inputCount.value--;
|
||||||
|
} else {
|
||||||
|
alert("Remove this item");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue