Добавлены 4 кнопки для каждой формы
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user