Skip to content
Snippets Groups Projects
Commit 7cf28298 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5656: fixing js for tabs

parent e29f486e
No related branches found
No related tags found
1 merge request!17ISTWCMS-5656: adding tabs
......@@ -50,13 +50,10 @@
.removeAttribute('hidden');
}
window.addEventListener('DOMContentLoaded', () => {
const tabs = document.querySelectorAll('[role="tab"]');
const tabList = document.querySelector('[role="tablist"]');
const tabs = document.querySelectorAll('[role="tab"]');
const tabList = document.querySelector('[role="tablist"]');
if (tabs.length === 0) {
return;
}
if (tabs.length !== 0) {
// Add a click event handler to each tab.
tabs.forEach(tab => {
......@@ -91,7 +88,7 @@
tabs[tabFocus].focus();
}
});
});
}
});
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment