function showTabs()

in ArticleTemplates/assets/js/bootstraps/common.js [542:569]


function showTabs() {
    let i;
    let href;
    let hideElem;
    let tab;
    let tabs;
    const tabContainer = document.getElementsByClassName('tabs')[0];

    if (tabContainer) {
        tabs = tabContainer.getElementsByTagName('a');

        for (i = 0; i < tabs.length; i++) {
            tab = tabs[i];

            if (i > 0) {
                href = tab.getAttribute('href');
                if (href) {
                    hideElem = document.querySelector(href);
                    if (hideElem) {
                        hideElem.style.display = 'none';
                    }
                }
            }

            tab.addEventListener('click', showTab.bind(null, tab, tabContainer));
        }
    }
}