mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 03:19:54 +03:00
27 lines
No EOL
723 B
JavaScript
27 lines
No EOL
723 B
JavaScript
'use strict';
|
|
|
|
var tabs = (function () {
|
|
let self = {},
|
|
$container;
|
|
|
|
function onHeaderClick(event) {
|
|
let $cT = $(event.currentTarget),
|
|
attrFor = $cT.attr("for");
|
|
|
|
$container.find('.subtab__header_label').removeClass("subtab__header_label--current");
|
|
$cT.addClass("subtab__header_label--current");
|
|
$container.find(".subtab__content--current").removeClass("subtab__content--current");
|
|
$container.find("#" + attrFor).addClass("subtab__content--current");
|
|
};
|
|
|
|
self.init = function ($dom) {
|
|
$container = $dom;
|
|
|
|
$container.find(".subtab__header_label").on('click', onHeaderClick);
|
|
};
|
|
|
|
return self;
|
|
|
|
})();
|
|
|
|
module.exports = tabs; |