From 4885f6ab4f9c8c8e34fbfbb4860c4abc4611c52c Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Thu, 16 Mar 2023 15:34:27 -0700 Subject: [PATCH] Fix buttons, 'expand all' should only expand all in section --- script/mapping-tables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/mapping-tables.js b/script/mapping-tables.js index eccc556..a4e6d12 100644 --- a/script/mapping-tables.js +++ b/script/mapping-tables.js @@ -249,7 +249,7 @@ document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll('button.expand').forEach(function (b){ b.addEventListener('click', function () { - detailsContainer = b.parentElement.querySelector('.details'); + detailsContainer = b.parentElement; expandCollapseDetails(detailsContainer, 'expand'); b.disabled = true; b.parentElement @@ -260,7 +260,7 @@ document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll('button.collapse').forEach(function (b){ b.addEventListener('click', function () { - detailsContainer = b.parentElement.querySelector('.details'); + detailsContainer = b.parentElement; expandCollapseDetails(detailsContainer, 'collapse'); b.disabled = true; b.parentElement