Home / eCommerce / Untitled Snippet
Duplicate Snippet

Embed Snippet on Your Site

Untitled Snippet

Code Preview
js
document.addEventListener("click", (e) => {
  const pill = e.target.closest(".rs-pill");
  if (!pill) return;
  const row = pill.parentElement;
  row.querySelectorAll(".rs-pill").forEach(p => p.classList.remove("active"));
  pill.classList.add("active");
});

Comments

Add a Comment