13 lines
535 B
JavaScript
13 lines
535 B
JavaScript
|
function tabControlSwitcher(tabcontrolIndex, neededIndex) {
|
||
|
//disable all
|
||
|
$(".tabnavigation_" + tabcontrolIndex).each(function () {
|
||
|
$(this).removeClass("tabitem-activated").addClass("tabitem-deactivated");
|
||
|
});
|
||
|
$(".tabpanel_" + tabcontrolIndex).each(function () {
|
||
|
$(this).hide();
|
||
|
});
|
||
|
|
||
|
// set current
|
||
|
$("#tabnavigation_" + tabcontrolIndex + "_" + neededIndex).removeClass("tabitem-deactivated").addClass("tabitem-activated");
|
||
|
$("#tabpanel_" + tabcontrolIndex + "_" + neededIndex).show();
|
||
|
}
|