var link = document.getElementById('nav-ask'); link.style.display = 'none'; //or link.style.visibility = 'hidden';