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

10 lines
358 B
JavaScript
Raw Permalink Normal View History

2023-05-02 11:20:14 +02:00
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');
}
});