From bb5feb14b9ee8fd36653cc624d038052965bf4d2 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 12 Nov 2024 17:34:26 +0100 Subject: feat(tag): collaspable --- index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'index.ts') 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(".tag") + +tags?.forEach(t => { + t.addEventListener("click", _ => { + t.classList.toggle("active") + }) +}) -- cgit v1.2.3