window.Sidebar = function () { let sidebar = document.querySelector("#sidebar"); let close = document.querySelector("#sidebar-toggle-close"); let toggle = document.querySelector("#sidebar-toggle-input"); sidebar.addEventListener("click", function (event) { toggle.checked = false; }) close.addEventListener("click", function (event) { event.preventDefault(); }) }