@@ -0,0 +1,15 @@
|
||||
(function () {
|
||||
var root = document.querySelector("[data-help-faq]");
|
||||
if (!root) return;
|
||||
|
||||
var items = root.querySelectorAll(".help-faq__item");
|
||||
|
||||
Array.prototype.forEach.call(items, function (item) {
|
||||
item.addEventListener("toggle", function () {
|
||||
if (!item.open) return;
|
||||
Array.prototype.forEach.call(items, function (other) {
|
||||
if (other !== item) other.open = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user