Code: Select all
let vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0)
if(vw < 801){
as = document.getElementById('as');
hamburger= document.createElement('span');
hamburger.setAttribute('id', 'hamburger');
hamburger.setAttribute('onclick', 'openNav();');
hamburger.innerHTML = '☰';
as.insertBefore(hamburger, as.firstChild)
}
if(vw > 800){
hamburger = document.getElementById("hamburger");
hamburger.remove();
}
Mobile version