pelican-jdr/public/js/mobile-sidebar.js

11 lines
352 B
JavaScript
Raw Normal View History

2024-10-12 10:30:32 +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');
}
});