I am a complete beginner with jquery and I need your help to improve my side nav. I try to make a side navigation inspire by this Wix template text
The difference is my menu is foating on the left, with 3 sliding sections and stays visible when the sliding is be open. Opening a section with the nav and close it with the “back” button works.
My problem is about options to close. All the sliding pages stays open if I don’t click on “back” and hide others because of the overlay. I think as well the button back to close a section is nice but not enough handy. I need other options. I would love two things:
- The sliding page closes if I click on a menu list item (even on the same menu item than current sliding)
- The sliding page closes if I click outside the sliding page (home page visible part)
Thank you very much for your help 🙂
Find my complete code here text
function dropLeft() {
document.getElementById("left").style.left = "0";
}
function closeLeft() {
document.getElementById("left").style.left = "-70%";
}
The beginner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.