diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-03-10 19:09:53 +0200 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-03-10 19:09:53 +0200 |
commit | f05f15dbe108e3fd10af8d15fb15c1b27e689f96 (patch) | |
tree | 5f6d888bbf5f2dbce5a21df15323c3f8e143b19b /rannak/mangud/arimees/muusika/script.js | |
parent | c525b29ceb91c0abacfe9916aafb1b0b48d47880 (diff) |
added Muusika and Kuulamine
Diffstat (limited to 'rannak/mangud/arimees/muusika/script.js')
-rwxr-xr-x | rannak/mangud/arimees/muusika/script.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rannak/mangud/arimees/muusika/script.js b/rannak/mangud/arimees/muusika/script.js new file mode 100755 index 0000000..8803bbe --- /dev/null +++ b/rannak/mangud/arimees/muusika/script.js @@ -0,0 +1,32 @@ +document.addEventListener('DOMContentLoaded', () => { + let btn = document.querySelector('.modalButton'); + btn.click(); +}); + + +const selectors = document.querySelectorAll('select'); + +for(el of selectors){ + el.addEventListener('change', () => { + + let selected = new Array(); + for (el of selectors){ + if (!selected.includes(el.value) && el.value != 'Vali') + selected.push(el.value); + } + + if (selected.length == 6) + moveOnEnable(); + + }); +} + + +// If All Else Done + +function moveOnEnable(){ + const btn = document.querySelector(".moveOn"); + btn.disabled = false; + btn.onclick = () => location.href = ""; +} + |