tramway/public/js/mobile-sidebar.js

11 lines
352 B
JavaScript
Raw Permalink Normal View History

2024-07-05 10:54:06 +02:00
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');
}
});