Spaces:
Running
Running
Download script.js from Time-2000/kidsync-scheduler: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/spaces/Time-2000/kidsync-scheduler/resolve/main/script.js
- Command line
-
hf download hf://spaces/Time-2000/kidsync-scheduler/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Time-2000/kidsync-scheduler/resolve/main/script.js
686 Bytes
| ```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'); | |
| } | |
| ``` |