Somewhat working

This commit is contained in:
Magnus Åhall 2026-02-23 07:59:45 +01:00
parent ad638acaf3
commit 4637689db4
6 changed files with 52 additions and 12 deletions

View file

@ -10,8 +10,11 @@ export class Application {
handlerTop(event) {
const fqdn = event.target
const top = fqdn.closest('.top')
const records = top.querySelector('.records')
console.log(fqdn, top, records)
const topEl = fqdn.closest('.top')
const records = document.querySelectorAll(`.record[data-top="${topEl.dataset.top}"]`)
console.log(`.record[data-top="${topEl.dataset.top}"]`)
console.log(topEl.dataset.top, records)
for (const r of records)
r.classList.toggle('show')
}
}