Добавлены 4 кнопки для каждой формы

This commit is contained in:
ARLakhin
2026-03-26 02:06:08 +03:00
parent b06903f448
commit f944c248ea
7 changed files with 87 additions and 20 deletions
+18
View File
@@ -0,0 +1,18 @@
let tabs_select = () => {
const tabsContainer = document.getElementById("tabs")
if (!tabsContainer) {
return;
}
const buttons = tabsContainer.getElementsByClassName("switch__button")
for (const button of buttons) {
const value = button.getAttribute("data-value");
const id = button.getAttribute("id");
button.classList.toggle("active__button", value === id);
}
}
document.addEventListener('turbo:load', tabs_select)
console.log('Hi')