Make Off canvas menu works without jQuery

Job ID: 35975781

Budget: ₹600 – ₹1,500 INR

I am working on Page speed experience. My WordPress theme contain jQuery and Theme.js file to manage dark mode, sticky sidebar for desktop and off canvas menu for less than 940 px screen size.

With my coding knowledge and help of ChatGPT, I made sticky sidebar and dark mode works without loading jQuery and Theme.js I also done off canvas menu open and close on toggle.

But the problem is the items within the off canvas menu not appearing on toggle. Only menu is showing. It means a blank menu. Now I am looking for a dev who can help me to get the Menu items also on toggle the off canvas.

Website: https://bit.ly/3YqhbNh

My solution that unable to call menu links.

<script>var toggleBtn = document.querySelector('.offcanvas-toggle');
var html = document.querySelector('html');
toggleBtn.addEventListener('click', function() {
html.classList.toggle('off-canvas-active');
});
var closeBtn = document.querySelector('.off-canvas .close');
var backdrop = document.querySelector('.off-canvas-backdrop');
closeBtn.addEventListener('click', function() {
html.classList.remove('off-canvas-active');
return false;
});
backdrop.addEventListener('click', function() {
closeBtn.click();
return false;
});</script>
Related categories: JavaScript CSS HTML jQuery