web_defender/static/ddos/js/index.js
2024-12-09 13:43:16 +05:30

14 lines
533 B
JavaScript

var headers = document.querySelectorAll('.tabSectionHeader');
headers.forEach(function (header) {
header.addEventListener('click', function () {
var clickedParent = header.parentNode;
headers.forEach(function (otherHeader) {
var otherParent = otherHeader.parentNode;
if (otherParent !== clickedParent) {
otherParent.classList.remove('chartActiveOpenClose');
}
});
clickedParent.classList.toggle('chartActiveOpenClose');
});
});