Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
document.addEventListener('DOMContentLoaded', () => {
const tabs = document.querySelectorAll('.tab');
const contents = document.querySelectorAll('.content');
tabs.forEach((tab, i) => {
tab.addEventListener('click', () => {
contents.forEach(c => c.style.display = 'none');
contents[i].style.display = 'block';
});
});
});Coding works best on desktop or with an external keyboard.