tramway/public/js/mobile-sidebar.js
Kazhnuz f971b96b02
All checks were successful
continuous-integration/drone/push Build is passing
feat: responsive design
Fixes #24
2024-07-05 10:54:06 +02:00

10 lines
352 B
JavaScript

document.getElementById('mobile-button').addEventListener('click', function () {
const sidebar = document.getElementById('sidebar');
if (!sidebar.classList.contains('shown')) {
sidebar.classList.remove('hidden');
sidebar.classList.add('shown');
} else {
sidebar.classList.remove('shown');
sidebar.classList.add('hidden');
}
});