improved reload trigger
This commit is contained in:
parent
baffda69cb
commit
2e0bc3764f
|
@ -17,14 +17,8 @@ function autoReload() {
|
||||||
el.addEventListener('change', checkForm, { once: true });
|
el.addEventListener('change', checkForm, { once: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
const choices = [];
|
|
||||||
|
|
||||||
function checkForm(e) {
|
function checkForm(e) {
|
||||||
item = e.target.id.charAt(1);
|
if (document.querySelectorAll('input[type="radio"]:checked').length == 5) {
|
||||||
if (choices.indexOf(item) === -1) {
|
|
||||||
choices.push(item);
|
|
||||||
}
|
|
||||||
if (choices.length === 5) {
|
|
||||||
countdown();
|
countdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue