function ready() {
document.querySelectorAll(`.value1 [class^=line]`).forEach(div => {
document.querySelector(`.value1 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value2 [class^=line]`).forEach(div => {
document.querySelector(`.value2 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value3 [class^=line]`).forEach(div => {
document.querySelector(`.value3 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value4 [class^=line]`).forEach(div => {
document.querySelector(`.value4 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value5 [class^=line]`).forEach(div => {
document.querySelector(`.value5 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value6 [class^=line]`).forEach(div => {
document.querySelector(`.value6 .${div.className}`).classList.add('visible');
});
document.querySelectorAll(`.value7 [class^=line]`).forEach(div => {
document.querySelector(`.value7 .${div.className}`).classList.add('visible');
});
}
function ready() {
for(let i = 1; i <= 7; i++) {
makeVisible("value" + i);
}
}
function makeVisible(selector) {
document.querySelectorAll('.'+selector+" [class^=line]").forEach(div => {
document.querySelector(`.${selector} .${div.className}`).classList.add('visible');
});
}
document.querySelectorAll(`[class^=line]`).forEach((item, i) => {
const parent = item.closest(`.value${i + 1}`);
if (i < 7 && parent) {
item.classList.add('visible');
}
})