nav js code example
Example: nav js
document.getElementById('open').addEventListener('click', open);
document.getElementById('close').addEventListener('click', close);
var nav = document.getElementById('nav');
var close = document.getElementById('close');
function open() {
nav.style.width = "100%";
setTimeout(
function (){
document.getElementById('close').style.display = "block";
}, 170);
}
function close(){
nav.style.width = "0";
close.style.display = "none";
}