mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-12 08:25:45 +00:00
updated folders to work with default spiffs
This commit is contained in:
parent
b251588c74
commit
0b08427b3e
4 changed files with 80 additions and 91 deletions
17
data/script.js
Normal file
17
data/script.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const form = document.querySelector("form");
|
||||
const dynamicInputs = form.querySelectorAll("[data-field][data-values]");
|
||||
|
||||
document.addEventListener("change", updateVisibility);
|
||||
|
||||
function updateVisibility() {
|
||||
dynamicInputs.forEach((element) => {
|
||||
const input = form.querySelector(`#${element.dataset.field}`);
|
||||
if (element.dataset.values.split("|").includes(input.value)) {
|
||||
element.classList.remove("hidden");
|
||||
} else {
|
||||
element.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateVisibility();
|
Loading…
Add table
Add a link
Reference in a new issue