diff --git a/public/themes/dist_static/static/js/download.js b/public/themes/dist_static/static/js/download.js index 032c59e..45b46eb 100644 --- a/public/themes/dist_static/static/js/download.js +++ b/public/themes/dist_static/static/js/download.js @@ -40,16 +40,19 @@ $(function() { if (!tabId) return; const $dropdownItem = $(`.d-tabs__dropdown-item[data-tab="${tabId}"]`).first(); if ($dropdownItem.length) { - $dropdownItem.addClass("is-active").siblings().removeClass("is-active"); + $(".d-tabs__dropdown-item").removeClass("is-active"); + $dropdownItem.addClass("is-active"); const $trigger = $dropdownItem.closest(".d-tabs__group").find("[data-dropdown-trigger]"); $trigger.find("span").text($dropdownItem.text()); activateTab($trigger); return; } + $(".d-tabs__dropdown-item").removeClass("is-active"); const $target = $(`.d-tabs__item[data-tab="${tabId}"]`).first(); if ($target.length) activateTab($target); }; $(".d-tabs__item:not([data-dropdown-trigger])").on("click", function() { + $(".d-tabs__dropdown-item").removeClass("is-active"); activateTab($(this)); closeDropdowns(); }); @@ -65,7 +68,8 @@ $(function() { }); $(".d-tabs__dropdown-item").on("click", function() { const $item = $(this); - $item.addClass("is-active").siblings().removeClass("is-active"); + $(".d-tabs__dropdown-item").removeClass("is-active"); + $item.addClass("is-active"); const $trigger = $item.closest(".d-tabs__group").find("[data-dropdown-trigger]"); $trigger.find("span").text($item.text()); activateTab($trigger); diff --git a/public/themes/website/1/zh/demo/download.html b/public/themes/website/1/zh/demo/download.html index 609a39f..77c6e01 100644 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -64,10 +64,18 @@