File size: 686 Bytes
060919e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
```javascript
function showDay(day) {
    // Удаляем класс 'active' у всех кнопок
    document.querySelectorAll('.buttons button').forEach(btn => {
        btn.classList.remove('active');
    });
    // Добавляем класс 'active' нажатой кнопке
    document.querySelector(`button[onclick="showDay('${day}')"]`).classList.add('active');
    
    // Скрываем все расписания
    document.querySelectorAll('.schedule').forEach(schedule => {
        schedule.classList.remove('show');
    });
    // Показываем выбранное расписание
    document.getElementById(day).classList.add('show');
}
```