inicio
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
document.querySelectorAll(".plan-card").forEach((card) => {
|
||||
const trigger = card.querySelector("[data-plan-trigger]");
|
||||
trigger?.addEventListener("click", () => {
|
||||
const wasExpanded = card.classList.contains("expanded");
|
||||
document.querySelectorAll(".plan-card").forEach((c) => c.classList.remove("expanded"));
|
||||
if (!wasExpanded) card.classList.add("expanded");
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user