commit 20260703
This commit is contained in:
+8
-8
@@ -1,22 +1,22 @@
|
||||
/**
|
||||
* Partnership page — FAQ accordion.
|
||||
* Partnership page — FAQ accordion (Figma export style).
|
||||
*/
|
||||
(function () {
|
||||
function initFaq(root) {
|
||||
if (!root) return;
|
||||
|
||||
root.querySelectorAll(".faq-header").forEach(function (header) {
|
||||
root.querySelectorAll(".partnership-faq__header").forEach(function (header) {
|
||||
header.addEventListener("click", function () {
|
||||
var item = header.closest(".faq-item");
|
||||
var item = header.closest(".partnership-faq__item");
|
||||
if (!item) return;
|
||||
|
||||
var isActive = item.classList.contains("active");
|
||||
root.querySelectorAll(".faq-item").forEach(function (el) {
|
||||
el.classList.remove("active");
|
||||
var isOpen = item.classList.contains("is-open");
|
||||
root.querySelectorAll(".partnership-faq__item").forEach(function (el) {
|
||||
el.classList.remove("is-open");
|
||||
});
|
||||
|
||||
if (!isActive) {
|
||||
item.classList.add("active");
|
||||
if (!isOpen) {
|
||||
item.classList.add("is-open");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user