This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
qdouze2-wordpress-theme/js/mobile-sidebar.js
2023-05-02 11:20:14 +02:00

10 lines
No EOL
358 B
JavaScript

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