aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-11-12 17:34:26 +0100
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-11-12 17:34:26 +0100
commitbb5feb14b9ee8fd36653cc624d038052965bf4d2 (patch)
tree24eca7f8e4a40442685e61fce30ecc3c24b653da /index.ts
parent64c8ae31ff131e9d1071abeda55a1c1cb2bf5125 (diff)
feat(tag): collaspable
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index f67b2c6..57e044c 100644
--- a/index.ts
+++ b/index.ts
@@ -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")
+ })
+})