From 1226d8369d4f458fe031f3bb1815c4f24dc265b0 Mon Sep 17 00:00:00 2001 From: Jan Grewe <jan@faked.org> Date: Sun, 11 Jun 2023 17:33:20 +0200 Subject: [PATCH] fix colorMode collapse on load settings --- data_src/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data_src/main.js b/data_src/main.js index b83d811..6f68df0 100644 --- a/data_src/main.js +++ b/data_src/main.js @@ -54,8 +54,11 @@ $(document).on('change', '.rangeSetting', function () { }); $('.btnColorMode').on('click', function () { + var controlledId = $(this).data('control'); $('.collapseSettings').each(function () { - bootstrap.Collapse.getInstance($(this)).hide(); + if ($(this).is('[id]') && '#'+$(this).attr('id') != controlledId) { + bootstrap.Collapse.getInstance($(this)).hide(); + } }); if ($(this).data('control')) { bootstrap.Collapse.getInstance($(this).data('control')).show(); -- GitLab