Answers for "nav js"

0

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";
}
Posted by: Guest on July-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language