1
0
Files
coconut-leaf/frontend/static/js/tabcontrol.js
yyc12345 a0e3385670 refactor: refactor for modern layout
- split frontend and backend.
- update backend with modern Python dev strategies.
2026-04-28 13:17:54 +08:00

10 lines
443 B
JavaScript

// all args are based on 1
function ccn_tabcontrol_SwitchTab(tabcontrolGroup, targetTabIndex) {
// close all panel and tab
$(".tabcontrol-tab-" + tabcontrolGroup).removeClass("is-active");
$(".tabcontrol-panel-" + tabcontrolGroup).hide();
// show specific
$("#tabcontrol-tab-" + tabcontrolGroup + "-" + targetTabIndex).addClass("is-active");
$("#tabcontrol-panel-" + tabcontrolGroup + "-" + targetTabIndex).show();
}