diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-12 17:34:26 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-12 17:34:26 +0100 |
| commit | bb5feb14b9ee8fd36653cc624d038052965bf4d2 (patch) | |
| tree | 24eca7f8e4a40442685e61fce30ecc3c24b653da /index.ts | |
| parent | 64c8ae31ff131e9d1071abeda55a1c1cb2bf5125 (diff) | |
feat(tag): collaspable
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1 +1,7 @@ -console.log("Hello via Bun!");
\ No newline at end of file +const tags = document.querySelectorAll<HTMLElement>(".tag") + +tags?.forEach(t => { + t.addEventListener("click", _ => { + t.classList.toggle("active") + }) +}) |
