const toggleSideMenu = function (e) { e.preventDefault(); let txt = ''; document.querySelector('#reps-menu').innerHTML = txt; }; document.addEventListener('DOMContentLoaded',function () { document.querySelector('#toggler-menu')?.addEventListener('click',toggleSideMenu); });